Comments (1)
Hi,
While this will certainly be too late for the original author of the question, here is what worked for me (Tensorflow 1.14). Disclaimer: I mostly don't know what I am doing, so if you are a real and rigorous programmer apologies in advance. But at least the following worked for me, thus it might help others out:
-
In Makefile, add -D_GLIBCXX_USE_CXX11_ABI=0 to each g++ command. This might already fix it for some. [1] [2]
-
In Makefile, add -L$TF_LIB -ltensorflow_framework to each g++ command, where TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') (this need to be added in the first lines). [3] [4] [5]. Depending on how you set things up on your computer, you might need to replace python with python3.
-
Check manually that you have a file called libtensorflow_framework.so in $TF_LIB (see point 2. on how to obtain that path). If not, you should have a file that is almost called like it (e.g., libtensorflow_framework.so.1). In that case, you need to create a symbolic link [6]:
$ cd [$TF_LIB]
$ ln -s libtensorflow_framework.so.1 libtensorflow_framework.so
- In Makefile, add -lcudart -L $CUDA_PATH/lib64 to each g++ command, where CUDA_PATH=/usr/local/cuda/ (this need to be added in the first lines). To locate where cuda was installed on your machine (e.g., it might be /usr/local/cuda-10.0/) check [6]
At that point, it should be working. But if for some reason it is not, you might still try one last trick while you are at it: replace every variable containing a path (e.g., "L$TF_LIB") with a "fixed text" (e.g., -L/home/julien/.local/lib/python3.6/site-packages/tensorflow). In the end here is the version that worked for me (it is not pretty, but does the job):
TF_INC="/home/julien/.local/lib/python3.6/site-packages/tensorflow/include/" #$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB="/home/julien/.local/lib/python3.6/site-packages/tensorflow" #$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
.PHONY: all
all: nms_net/matching_module/det_matching.so nms_net/roi_pooling_layer/roi_pooling.so imdb/file_formats/AnnoList_pb2.py
nms_net/roi_pooling_layer/roi_pooling.so: nms_net/roi_pooling_layer/roi_pooling_op.o nms_net/roi_pooling_layer/roi_pooling_op_gpu.o
g++ -std=c++11 -shared $^ -o $@ -fPIC -O2 -lcudart -L/usr/local/cuda-10.0/lib64 -D_GLIBCXX_USE_CXX11_ABI=0 -L/home/julien/.local/lib/python3.6/site-packages/tensorflow -ltensorflow_framework
%.o: %.cc
g++ -std=c++11 -c $< -o $@ -fPIC -I ${TF_INC} -O2 -lcudart -L/usr/local/cuda-10.0/lib64 -D_GLIBCXX_USE_CXX11_ABI=0 -L/home/julien/.local/lib/python3.6/site-packages/tensorflow -ltensorflow_framework
%.o: %.cu
nvcc -std=c++11 -c $< -o $@ -I ${TF_INC} -O2 -x cu -arch=sm_35 -D GOOGLE_CUDA=1 -Xcompiler -fPIC
%.so: %.cc
g++ -std=c++11 -shared $< -o $@ -fPIC -I ${TF_INC} -O2 -lcudart -L/usr/local/cuda-10.0/lib64 -D_GLIBCXX_USE_CXX11_ABI=0 -L/home/julien/.local/lib/python3.6/site-packages/tensorflow -ltensorflow_framework
%_pb2.py: %.proto
protoc --python_out=. $<
Hope that these loose instructions will help someone.
from gossipnet.
Related Issues (13)
- pretrained model HOT 1
- there is an error running train.py HOT 2
- roi_pooling.so: undefined symbol HOT 3
- AttributeError: 'EasyDict' object has no attribute 'test_model' HOT 8
- KeyError: 'gt_classes' HOT 7
- do you have caffe version ? HOT 5
- Strong Tnet
- Problem with Makefile HOT 12
- Error in compiling: make: *** [nms_net/matching_module/det_matching.so] Fehler 1 HOT 4
- compute Map
- Trained Model for COCO multiclass setting
- Run with TF 1.12.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gossipnet.