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

能否添加clip层 #276

Open
kingmacth opened this issue Jan 12, 2021 · 3 comments
Open

能否添加clip层 #276

kingmacth opened this issue Jan 12, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@kingmacth
Copy link

https://github.com/BVLC/caffe/blob/9b891540183ddc834a02b2bd81b31afae71b2153/docs/tutorial/layers/clip.md

BVLC版本中已经添加了这个层。
我自己尝试添加,修改proto文件。复制cpp、cu、hpp文件到对应目录,编译无法通过了。

@eric612 eric612 added the enhancement New feature or request label Jan 12, 2021
@kingmacth
Copy link
Author

我编译提示如下错误:`[ 0%] Running C++/Python protocol buffer compiler on /home/MobileNet-YOLO-master/src/caffe/proto/caffe.proto
Scanning dependencies of target caffeproto
[ 0%] Building CXX object src/caffe/CMakeFiles/caffeproto.dir///include/caffe/proto/caffe.pb.cc.o
[ 1%] Linking CXX static library ../../lib/libcaffeproto.a
[ 1%] Built target caffeproto
[ 1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_clip_layer.cu.o
/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(27): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(28): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(53): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(54): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(27): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(28): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(53): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(63): here

/home/MobileNet-YOLO-master/src/caffe/layers/clip_layer.cu(54): error: class "caffe::LayerParameter" has no member "clip_param"
detected during instantiation of "void caffe::ClipLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(63): here

8 errors detected in the compilation of "/tmp/tmpxft_00001518_00000000-6_clip_layer.cpp1.ii".
CMake Error at cuda_compile_generated_clip_layer.cu.o.cmake:266 (message):
Error generating file
/home/MobileNet-YOLO-master/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_clip_layer.cu.o

src/caffe/CMakeFiles/caffe.dir/build.make:1120: recipe for target 'src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_clip_layer.cu.o' failed
make[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_clip_layer.cu.o] Error 1
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`

我尝试编译BLVC版本是正确的。在YOLO这个版本中添加层与BLVC版本有区别么?需要额外做什么操作?

@crazybill-first
Copy link

e,看样子好像是你的caffe::LayerParameter没有写对,检查过了吗?

1 similar comment
@crazybill-first
Copy link

e,看样子好像是你的caffe::LayerParameter没有写对,检查过了吗?

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

No branches or pull requests

3 participants