You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build with CPU only. I don't want to train the model but I wanted just to make an inference and to look in more details in the dimensions of different variables in the model.
Is it possible to build your version of caffe with CPU_ONLY flag? I succeeded it with normal caffe.
Error obtained:
src/caffe/layers/argmax_layer.cpp:99:29: error: macro "STUB_GPU_FORWARD" requires 2 arguments, but only 1 given
STUB_GPU_FORWARD(ArgMaxLayer);
^
src/caffe/layers/argmax_layer.cpp:99:1: error: ‘STUB_GPU_FORWARD’ does not name a type
STUB_GPU_FORWARD(ArgMaxLayer);
^
Makefile:581: recipe for target '.build_release/src/caffe/layers/argmax_layer.o' failed
make: *** [.build_release/src/caffe/layers/argmax_layer.o] Error 1
The text was updated successfully, but these errors were encountered:
This is a bug you may encounter if you want to compile with CPU only flag on.
The backward function for argmax layer was not implemented for CPU users, this is why the author use STUB_GPU_FORWARD to register the layer for CPU instead of STUB_GPU like other layers. However, the author may have forgotten to add necessary argument for the function.
Go to argmax_layer.cpp and simply change STUB_GPU_FORWARD(ArgMaxLayer); to STUB_GPU_FORWARD(ArgMaxLayer,Forward); should solve the issue.
Makefile.config:
CPU_ONLY := 1
I am trying to build with CPU only. I don't want to train the model but I wanted just to make an inference and to look in more details in the dimensions of different variables in the model.
Is it possible to build your version of caffe with CPU_ONLY flag? I succeeded it with normal caffe.
Error obtained:
src/caffe/layers/argmax_layer.cpp:99:29: error: macro "STUB_GPU_FORWARD" requires 2 arguments, but only 1 given
STUB_GPU_FORWARD(ArgMaxLayer);
^
src/caffe/layers/argmax_layer.cpp:99:1: error: ‘STUB_GPU_FORWARD’ does not name a type
STUB_GPU_FORWARD(ArgMaxLayer);
^
Makefile:581: recipe for target '.build_release/src/caffe/layers/argmax_layer.o' failed
make: *** [.build_release/src/caffe/layers/argmax_layer.o] Error 1
The text was updated successfully, but these errors were encountered: