mshadow
mshadow copied to clipboard
Make error in mshadow/guide/neuralnet
make in mshadow/guide/neuralnet, errors occured:
convnet.cu(93): error: no instance of overloaded function "pool" matches the argument l
argument types are: (mshadow::TensorContainer<mshadow::gpu, 4, real_t>, mshShape<2>, int, int, int)
detected during:
instantiation of "void ConvNet<xpu>::Forward(const mshadow::Tensor<mshadow:4, real_t> &, mshadow::Tensor<mshadow::cpu, 2, real_t> &) [with xpu=mshadow::gpu]"
(78): here
instantiation of "ConvNet<xpu>::ConvNet(int, int, int, int, int, int, int) xpu=mshadow::gpu]"
(225): here
convnet.cu(116): error: no instance of function template "mshadow::expr::unpool" matcheargument list
argument types are: (mshadow::TensorContainer<mshadow::gpu, 4, real_t>, mshTensorContainer<mshadow::gpu, 4, real_t>, mshadow::TensorContainer<mshadow::gpu, 4, reaint, int, int)
detected during:
instantiation of "void ConvNet<xpu>::Backprop(const mshadow::Tensor<mshadow 2, real_t> &) [with xpu=mshadow::gpu]"
(78): here
instantiation of "ConvNet<xpu>::ConvNet(int, int, int, int, int, int, int) xpu=mshadow::gpu]"
(225): here
convnet.cu(93): error: no instance of overloaded function "pool" matches the argument l
argument types are: (mshadow::TensorContainer<mshadow::cpu, 4, real_t>, mshShape<2>, int, int, int)
detected during:
instantiation of "void ConvNet<xpu>::Forward(const mshadow::Tensor<mshadow:4, real_t> &, mshadow::Tensor<mshadow::cpu, 2, real_t> &) [with xpu=mshadow::cpu]"
(78): here
instantiation of "ConvNet<xpu>::ConvNet(int, int, int, int, int, int, int) xpu=mshadow::cpu]"
(228): here
convnet.cu(116): error: no instance of function template "mshadow::expr::unpool" matcheargument list
argument types are: (mshadow::TensorContainer<mshadow::cpu, 4, real_t>, mshTensorContainer<mshadow::cpu, 4, real_t>, mshadow::TensorContainer<mshadow::cpu, 4, reaint, int, int)
detected during:
instantiation of "void ConvNet<xpu>::Backprop(const mshadow::Tensor<mshadow 2, real_t> &) [with xpu=mshadow::cpu]"
(78): here
instantiation of "ConvNet<xpu>::ConvNet(int, int, int, int, int, int, int) xpu=mshadow::cpu]"
(228): here
4 errors detected in the compilation of "/tmp/tmpxft_00003999_00000000-9_convnet.cpp1.i
make: *** [convnet] Error 2
how to solve it? thx
@tqchen @piiswrong
I encountered the same problem.
As of now, I am getting this:
nvcc -o nnet -O3 --use_fast_math -ccbin g++ -Xcompiler "-Wall -O3 -I../../ -fopenmp -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0" -Xlinker "-lm -lm -lcudart -lcublas -lcurand -lcusolver -lopenblas" nnet.cu
../../mshadow/./stream_gpu-inl.h(195): error: namespace "std" has no member "unique_ptr"
../../mshadow/./stream_gpu-inl.h(195): error: type name is not allowed
../../mshadow/./stream_gpu-inl.h(195): error: type name is not allowed
../../mshadow/./stream_gpu-inl.h(195): error: identifier "st" is undefined
nnet.cu(39): error: no instance of overloaded function "NewStream" matches the argument list
detected during instantiation of "NNet<xpu>::NNet(int, int, int, int) [with xpu=mshadow::gpu]"
(150): here
nnet.cu(39): error: no instance of overloaded function "NewStream" matches the argument list
detected during instantiation of "NNet<xpu>::NNet(int, int, int, int) [with xpu=mshadow::cpu]"
(153): here
nnet.cu(64): error: function "mshadow::Random<mshadow::cpu, DType>::SampleGaussian(mshadow::Tensor<mshadow::cpu, dim, DType> *, DType, DType) [with DType=real_t, dim=2]"
../../mshadow/./random.h(285): here is inaccessible
detected during instantiation of "NNet<xpu>::NNet(int, int, int, int) [with xpu=mshadow::cpu]"
(153): here
nnet.cu(65): error: function "mshadow::Random<mshadow::cpu, DType>::SampleGaussian(mshadow::Tensor<mshadow::cpu, dim, DType> *, DType, DType) [with DType=real_t, dim=2]"
../../mshadow/./random.h(285): here is inaccessible
detected during instantiation of "NNet<xpu>::NNet(int, int, int, int) [with xpu=mshadow::cpu]"
(153): here
8 errors detected in the compilation of "/tmp/tmpxft_00003dec_00000000-9_nnet.cpp1.ii".
Makefile:35: recipe for target 'nnet' failed
make: *** [nnet] Error 2
But /guide
compiles normally.
@arogozhnikov You need to add -std=c++11
into CFLAGS
.
You can use the Makefile in guide
folder as an example: https://github.com/dmlc/mshadow/blob/master/guide/Makefile#L7
This code base has been donated to the Apache MXNet project per #373, and repo is deprecated. Future development and issue tracking should continue in Apache MXNet.