Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: class "caffe::LayerParameter" has no member "swish_param" #6309

Closed
bill-lin opened this issue Mar 23, 2018 · 2 comments
Closed

error: class "caffe::LayerParameter" has no member "swish_param" #6309

bill-lin opened this issue Mar 23, 2018 · 2 comments

Comments

@bill-lin
Copy link

bill-lin commented Mar 23, 2018

Hi,

I am trying to compile caffe from the latest master branch and got following errors. Does anyone know how to solve it?

Many thanks!

[ 30%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_eltwise_layer.cu.o
[ 30%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_swish_layer.cu.o
[ 30%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_lstm_unit_layer.cu.o
/root/caffe/src/caffe/layers/swish_layer.cu(16): error: class "caffe::LayerParameter" has no member "swish_param"
          detected during instantiation of "void caffe::SwishLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]" 
(52): here

/root/caffe/src/caffe/layers/swish_layer.cu(44): error: class "caffe::LayerParameter" has no member "swish_param"
          detected during instantiation of "void caffe::SwishLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]" 
(52): here

/root/caffe/src/caffe/layers/swish_layer.cu(16): error: class "caffe::LayerParameter" has no member "swish_param"
          detected during instantiation of "void caffe::SwishLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" 
(52): here

/root/caffe/src/caffe/layers/swish_layer.cu(44): error: class "caffe::LayerParameter" has no member "swish_param"
          detected during instantiation of "void caffe::SwishLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" 
(52): here

4 errors detected in the compilation of "/tmp/tmpxft_0000105b_00000000-8_swish_layer.compute_61.cpp1.ii".
CMake Error at cuda_compile_generated_swish_layer.cu.o.cmake:266 (message):
  Error generating file
  /root/caffe/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_swish_layer.cu.o


src/caffe/CMakeFiles/caffe.dir/build.make:462: recipe for target 'src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_swish_layer.cu.o' failed
make[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_swish_layer.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:304: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

The command '/bin/sh -c git clone -b ${CAFFE_VERSION} --depth 1 https://github.com/BVLC/caffe.git /root/caffe && 	cd /root/caffe && 	yes | cp -rf /root/caffe_update/* /root/caffe && 	cat python/requirements.txt | xargs -n1 pip install && 	mkdir build && cd build && 	cmake -DCUDA_ARCH_NAME="Manual" -DCUDA_ARCH_BIN="52 60 61" -DCUDA_ARCH_PTX="61" -DUSE_CUDNN=1 -DBLAS=Open  -DOPENCV_VERSION=3 .. && 	make -j"$(nproc)" all && 	make install' returned a non-zero code: 2

@Noiredd
Copy link
Member

Noiredd commented Mar 23, 2018

This is weird... LayerParameter undoubtedly does contain a member swish_param. Can you verify that your caffe.proto looks the same?

@bill-lin
Copy link
Author

sorry, it's my fault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants