Faster-RCNN_TF: cannot run demo on CPU mode
running inside the latest docker tensorflow:
docker run -it -p 8888:8888 tensorflow/tensorflow
`
root@f54905c5bdaf:/notebooks/Faster-RCNN_TF# python ./tools/demo.py --model /VGGnet_fast_rcnn_iter_70000.ckpt Traceback (most recent call last): File “./tools/demo.py”, line 11, in <module> from networks.factory import get_network File “/notebooks/Faster-RCNN_TF/tools/…/lib/networks/init.py”, line 8, in <module> from .VGGnet_train import VGGnet_train File “/notebooks/Faster-RCNN_TF/tools/…/lib/networks/VGGnet_train.py”, line 2, in <module> from networks.network import Network File “/notebooks/Faster-RCNN_TF/tools/…/lib/networks/network.py”, line 3, in <module> import roi_pooling_layer.roi_pooling_op as roi_pool_op File “/notebooks/Faster-RCNN_TF/tools/…/lib/roi_pooling_layer/roi_pooling_op.py”, line 5, in <module> _roi_pooling_module = tf.load_op_library(filename) File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py”, line 63, in load_op_library raise errors._make_specific_exception(None, None, error_msg, error_code) tensorflow.python.framework.errors.NotFoundError: /notebooks/Faster-RCNN_TF/tools/…/lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _Z22ROIPoolBackwardLaucherPKffiiiiiiiS0_PfPKiRKN5Eigen9GpuDeviceE
root@f54905c5bdaf:/notebooks/Faster-RCNN_TF# nm -gC lib/roi_pooling_layer/roi_pooling.so |grep GpuDevice U ROIPoolForwardLaucher(float const*, float, int, int, int, int, int, int, float const*, float*, int*, Eigen::GpuDevice const&) U ROIPoolBackwardLaucher(float const*, float, int, int, int, int, int, int, int, float const*, float*, int const*, Eigen::GpuDevice const&) U Eigen::GpuDevice const& tensorflow::OpKernelContext::eigen_deviceEigen::GpuDevice() const
`
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 38
Hi
i find the root causes of the issue. when use CPU only mode without installing cude , library roi_pooling.so compile function “ROIPoolBackwardLaucher” into it.However, the function is implemented in cuda related module and only for GPU.So when execute demo, can’t find the implement of function ROIPoolBackwardLaucher,crash happen.
i prepare a patch for that issue, and verified the issue is gone after applying the patch. when i try to push the patch, i find there was a patch there but isn’t merged:
you can refer to: https://github.com/smallcorgi/Faster-RCNN_TF/pull/183/commits/0dcb55cebeaa85c9f0a46ff62384bbeaae98323e
or use my patch: https://drive.google.com/file/d/0BxlQuWrSazOxd29PNjVIenZneHM/view?usp=sharing
Best wishes! Zhuojin
I meet similar issue in ubuntu16.04 with g++ version 5.4.0 and TF v0.12.Befor add “-D_GLIBCXX_USE_CXX11_ABI=0” in make.sh, show “_ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE” when run the demo, and after add ,show “_Z22ROIPoolBackwardLaucherPKffiiiiiiiS0_PfPKiRKN5Eigen9GpuDeviceE” when run the demo.
I have’nt GPU,How can I run the demo in CPU-noly mode?
Hi all, I’ve figured out a workaround to use only the CPU. I have only tested this method for the demo script, not sure if it will work for training, but it should.
Download and Install CUDA: https://developer.nvidia.com/cuda-downloads
Compile for GPU OR Copy my .so You can download my .so file from here: https://drive.google.com/open?id=0B-0d5quIGY5XVEJvYU9XRkVJTWM Or you can run make.sh and compile with CUDA (not sure if this will work)
Include these lines of code at the top of your Python scripts import os os.environ[‘CUDA_VISIBLE_DEVICES’] = ‘’
I succeed to run another faster-rcnn on CPU from this repo