lmb-freiburg / flownet2

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
https://lmb.informatik.uni-freiburg.de/Publications/2017/IMKDB17/
Other
1k stars 318 forks source link

compile error with CPU_ONLY option #48

Closed avd77 closed 7 years ago

avd77 commented 7 years ago

I am getting compile error with CPU_ONLY=1 in makefile.config.

make -j 5 all tools pycaffe examples/mnist examples/cpp_classification examples/siamese examples/cifar10 matlab/+caffe/private python/caffe src/caffe src/caffe/layers src/caffe/util src/caffe/test src/caffe/proto src/caffe/solvers src/gtest tools PROTOC (python) src/caffe/proto/caffe.proto CXX src/caffe/layers/dropout_layer.cpp CXX src/caffe/layers/hdf5_data_layer.cpp PROTOC src/caffe/proto/caffe.proto CXX src/caffe/layers/channel_norm_layer.cpp CXX src/caffe/layers/image_data_layer.cpp CXX src/caffe/layers/neg_relu_layer.cpp CXX src/caffe/layers/im2col_layer.cpp CXX src/caffe/layers/loss_layer.cpp src/caffe/layers/channel_norm_layer.cpp: In instantiation of ‘void caffe::ChannelNormLayer::Reshape(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’: src/caffe/layers/channel_norm_layer.cpp:193:1: required from here src/caffe/layers/channel_norm_layer.cpp:34:13: warning: unused variable ‘channels’ [-Wunused-variable] const int channels = bottom[0]->channels(); ^ src/caffe/layers/channel_norm_layer.cpp: In instantiation of ‘void caffe::ChannelNormLayer::Reshape(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = double]’: src/caffe/layers/channel_norm_layer.cpp:193:1: required from here src/caffe/layers/channel_norm_layer.cpp:34:13: warning: unused variable ‘channels’ [-Wunused-variable] CXX src/caffe/layers/pooling_layer.cpp CXX src/caffe/layers/hinge_loss_layer.cpp CXX src/caffe/layers/generate_augmentation_parameters_layer.cpp CXX src/caffe/layers/relu_layer.cpp CXX src/caffe/layers/imgreader_layer.cpp CXX src/caffe/layers/custom_data_layer.cpp CXX src/caffe/layers/cudnn_conv_layer.cpp CXX src/caffe/layers/cudnn_relu_layer.cpp CXX src/caffe/layers/imgwriter_layer.cpp CXX src/caffe/layers/sigmoid_layer.cpp CXX src/caffe/layers/reshape_layer.cpp In file included from ./include/caffe/common.hpp:19:0, from ./include/caffe/blob.hpp:8, from ./include/caffe/layer.hpp:8, from src/caffe/layers/generate_augmentation_parameters_layer.cpp:9: src/caffe/layers/generate_augmentation_parameters_layer.cpp:116:10: error: redefinition of ‘void caffe::GenerateAugmentationParametersLayer::Backward_gpu(const std::vector<caffe::Blob>&, const std::vector&, const std::vector<caffe::Blob>&)’ STUB_GPU(GenerateAugmentationParametersLayer); ^ ./include/caffe/util/device_alternate.hpp:17:6: note: in definition of macro ‘STUB_GPU’ void classname::Backward_gpu(const vector<Blob>& top, \ ^ In file included from src/caffe/layers/generate_augmentation_parameters_layer.cpp:10:0: ./include/caffe/layers/generate_augmentation_parameters_layer.hpp:38:16: error: ‘virtual void caffe::GenerateAugmentationParametersLayer::Backward_gpu(const std::vector<caffe::Blob>&, const std::vector&, const std::vector<caffe::Blob>&)’ previously declared here virtual void Backward_gpu(const vector<Blob>& top, ^ make: [.build_release/src/caffe/layers/generate_augmentation_parameters_layer.o] Error 1 make: Waiting for unfinished jobs.... In file included from ./include/caffe/common.hpp:19:0, from ./include/caffe/blob.hpp:8, from ./include/caffe/layer.hpp:8, from src/caffe/layers/imgwriter_layer.cpp:9: ./include/caffe/util/device_alternate.hpp:24:36: error: no ‘void caffe::ImgWriterLayer::Forward_gpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&)’ member function declared in class ‘caffe::ImgWriterLayer’ const vector<Blob*>& top) { NO_GPU; } \ ^ src/caffe/layers/imgwriter_layer.cpp:147:1: note: in expansion of macro ‘STUB_GPU_FORWARD’ STUB_GPU_FORWARD(ImgWriterLayer, Forward); ^ make: *** [.build_release/src/caffe/layers/imgwriter_layer.o] Error 1

avd77 commented 7 years ago

Makefile.config.txt

makefile.config

nikolausmayer commented 7 years ago

Hi, we never use the CPU_ONLY mode, so it's very possible that the compile error is our fault. We won't be able to provide support for this though, sorry.

WeixiangXu commented 7 years ago

try to uncomment "STUB_GPU"

varteev commented 6 years ago

Hi, I have the same error: I am compiling caffe for dispnet and see the same error (Debian on Virtualbox). How did you solve the issue?

firasomran01 commented 6 years ago

Hallo guys, I am having the same problem. Did anyone manage to solve it ? Thanks

Evidlo commented 5 years ago

I'm also having the same issue. I wanted to try out flownet on a handful of images without the hassle of installing CUDA.

nikolausmayer commented 5 years ago

@Evidlo "freedom from hassle" is exactly what we made https://github.com/lmb-freiburg/flownet2-docker for :wink:

benprofitt commented 4 years ago

Was anyone ever able to find a solution to the original problem? I have an AMD GPU and unfortunately cannot use CUDA. :(

nikolausmayer commented 4 years ago

@benprofitt Unfortunately we do not have the capacity (or expertise) to provide support for this. Perhaps one of the numerous alternative implementations in PyTorch or TensorFlow can be used in your case (you can find some on GitHub). I cannot say for sure; I have never tested that.

benprofitt commented 4 years ago

@nikolausmayer Thank you for taking the time to respond, I will look into those options!