Coder Social home page Coder Social logo

Comments (21)

nsivaramakrishnan avatar nsivaramakrishnan commented on June 4, 2024 8

Hi,
I am getting the same error while trying to run demo.py:
tensorflow.python.framework.errors_impl.NotFoundError: /home/fmc/rcnn/Faster-RCNN_TF/tools/../lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _Z22ROIPoolBackwardLaucherPKffiiiiiiiS0_PfPKiRKN5Eigen9GpuDeviceE
I added "-D_GLIBCXX_USE_CXX11_ABI=0" in make,sh. I use g++ version 5.4.0 and TF V0.12. Btw, am trying to run this on CPU. Any help is highly appreciated.
-Siva

from tffrcnn.

jwnsu avatar jwnsu commented on June 4, 2024 2

for gcc5, simply add this to compile flag "-D_GLIBCXX_USE_CXX11_ABI=0", then it will work fine. It's documented issue by tensor flow: https://www.tensorflow.org/versions/r0.10/how_tos/adding_an_op/index.html, search for "gcc5".

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024 1

If it does not work, try to install a different version of g++, via sudo apt-get install g++-4.x or sudo apt-get install g++-5.x
Then run
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/g++-4.x /usr/bin/g++

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

Hi, @xinghedyc , I think you first should go to ./lib/ dir and run make

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

Maybe, you should edit the g++ config according to your platform to ensure the roi_pooing.so is correct.
See ./lib/make.sh

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

@CharlesShang thanks for your reply, but the make command seems right to generate roi_pooing.so.

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

@CharlesShang thanks for your reply, but the make command seems right to generate roi_pooing.so.

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

It happened to me too, the roi_pooing.so seems all right, but it just could not work.
Check this issue: Failed when running tf.load_op_library(roi_pooling_so)
It's very embarrassing to say that I've not figured out the real solution. Alternatively, you can download a already-compiled .so file, or try re-start your machine.

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

@CharlesShang thanks a lot, but your link to download the roi_pooling_so seems unreachable?
https://github.com/CharlesShang/TFFRCNN/tree/master/lib/roi_pooling_layer/roi_pooling.so
it shows 404 not found?

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

Try this link so version

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

@CharlesShang it's embarrassingto say that the same error occurs when using your .so file.
It's so strange.
Thanks you anyway!

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

python faster_rcnn/demo.py VGGnet_fast_rcnn_iter_70000.ckpt
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
faster_rcnn
Traceback (most recent call last):
File "faster_rcnn/demo.py", line 12, in
from lib.networks.factory import get_network
File "/home/dyc/workspace/TFFRCNN/lib/networks/init.py", line 8, in
from .VGGnet_train import VGGnet_train
File "/home/dyc/workspace/TFFRCNN/lib/networks/VGGnet_train.py", line 2, in
from network import Network
File "/home/dyc/workspace/TFFRCNN/lib/networks/network.py", line 4, in
from ..roi_pooling_layer import roi_pooling_op as roi_pool_op
File "/home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/init.py", line 7, in
import roi_pooling_op
File "/home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/roi_pooling_op.py", line 5, in
_roi_pooling_module = tf.load_op_library(filename)
File "/home/dyc/anaconda2/lib/python2.7/site-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: /home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

I googled it, found: GPflow/GPflow#173
According to james, the problem is tf and roi_pooling are built with different versions of g++,
Try to add -D_GLIBCXX_USE_CXX11_ABI=0 in your make.sh will solve this issue

I've already push the fixed make.sh to master branch, you can go to TFFRCNN root dir and run git pull, then complie the roi_pooling.so

from tffrcnn.

xinghedyc avatar xinghedyc commented on June 4, 2024

@CharlesShang thanks very much for your help!
it works now, really thanks you!

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

Glad to hear that. Maybe we've found out the real solution to this kind of issue

from tffrcnn.

CharlesShang avatar CharlesShang commented on June 4, 2024

@jwnsu Thanks for your helpful discussion. Learned a lot .

from tffrcnn.

civilman628 avatar civilman628 commented on June 4, 2024

update as:

g++ -std=c++11 -shared -o roi_pooling.so roi_pooling_op.cc  -D_GLIBCXX_USE_CXX11_ABI=0  \
	roi_pooling_op.cu.o -I $TF_INC  -D GOOGLE_CUDA=1 -fPIC $CXXFLAGS \
	-lcudart -L $CUDA_PATH/lib64 

from tffrcnn.

chaochaow avatar chaochaow commented on June 4, 2024

@nsivaramakrishnan I got the same problem like yours when running on CPU. Do you have any luck to solve this issue?

from tffrcnn.

louisquinn avatar louisquinn commented on June 4, 2024

@nsivaramakrishnan @chaochaow
I'm getting a similar issue when attempting to build for CPU:
Faster-RCNN_TF/tools/../lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv

This looks like a missing tensorflow symbol.
I'm using g++ v5.4.0 as well. Not sure if downgrading to v4.x will help.

from tffrcnn.

chaochaow avatar chaochaow commented on June 4, 2024

GPU version does not have this problem

from tffrcnn.

kalanityL avatar kalanityL commented on June 4, 2024

I had the issue with GPU
solution given by @Griovwe here worked:
you have to add "-D_GLIBCXX_USE_CXX11_ABI=0" to both the g++ lines for roi_pooling layer and psroi_pooling layer if you encountered this problem.

from tffrcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.