cudnn: added OpenCV libs to Linux build.
This commit is contained in:
Родитель
5618b6c77a
Коммит
74999d4fc6
|
@ -432,6 +432,8 @@ bool ImageReader<ElemType>::GetMinibatch(std::map<std::wstring, Matrix<ElemType>
|
|||
{
|
||||
const auto& p = files[i + m_mbStart];
|
||||
cv::Mat img{ cv::imread(p.first, cv::IMREAD_COLOR) };
|
||||
if (!img.data)
|
||||
RuntimeError("Cannot read image file " + p.first);
|
||||
for (auto& t: m_transforms)
|
||||
t->Apply(img);
|
||||
|
||||
|
|
5
Makefile
5
Makefile
|
@ -405,9 +405,12 @@ IMAGEREADER:=$(LIBDIR)/ImageReader.so
|
|||
ALL += $(IMAGEREADER)
|
||||
SRC+=$(IMAGEREADER_SRC)
|
||||
|
||||
INCLUDEPATH += $(OPENCV_PATH)/include
|
||||
LIBPATH += $(OPENCV_PATH)/release/lib
|
||||
|
||||
$(IMAGEREADER): $(IMAGEREADER_OBJ) | $(CNTKMATH_LIB)
|
||||
@echo $(SEPARATOR)
|
||||
$(CXX) $(LDFLAGS) -shared $(patsubst %,-L%, $(LIBDIR) $(LIBPATH)) $(patsubst %,$(RPATH)%, $(ORIGINDIR) $(LIBPATH)) -o $@ $^ -l$(CNTKMATH)
|
||||
$(CXX) $(LDFLAGS) -shared $(patsubst %,-L%, $(LIBDIR) $(LIBPATH)) $(patsubst %,$(RPATH)%, $(ORIGINDIR) $(LIBPATH)) -o $@ $^ -l$(CNTKMATH) -lopencv_core -lopencv_imgproc -lopencv_imgcodecs
|
||||
endif
|
||||
|
||||
########################################
|
||||
|
|
Загрузка…
Ссылка в новой задаче