sadeepj / crfasrnn_keras

CRF-RNN Keras/Tensorflow version
http://crfasrnn.torr.vision
MIT License
603 stars 170 forks source link

demo error #35

Closed liuleiBUAA closed 5 years ago

liuleiBUAA commented 6 years ago

Hi,I have follow all the step, and run the demo, the error is ./src/cpp/high_dim_filter.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringEv I have change the makefie following this

------------------------------------------------------------------------------------------------------------i----------

Instructions:

1. Activate your Tensorflow virtualenv before running this script.

2. This script assumes gcc version >=5. If you have an older version, remove the -D_GLIBCXX_USE_CXX11_ABI=0 flag below.

3. On Mac OS X, the additional flag "-undefined dynamic_lookup" is required.

4. If this script fails, please refer to https://www.tensorflow.org/extend/adding_an_op#build_the_op_library for help.

-----------------------------------------------------------------------------------------------------------------------

TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') But it still has the same problem

Relevant system information:

Ubuntu 17.10
Python 3.5
TensorFlow 1.6.0 
Keras 2.1.5
liuleiBUAA commented 6 years ago

I solved it ,just change the makefile -D_GLIBCXX_USE_CXX11_ABI=0 to -D_GLIBCXX_USE_CXX11_ABI=1

cquptlxf commented 5 years ago

I have the same problem,and I change the makefile -D_GLIBCXX_USE_CXX11_ABI=0 to -D_GLIBCXX_USE_CXX11_ABI=1,but it didn't work,so can you solve it?

cquptlxf commented 5 years ago

The error is"tensorflow.python.framework.errors_impl.NotFoundError: ./src/cpp/high_dim_filter.so: undefined symbol: _ZTIN10tensorflow8OpKernelE",and I use the virtualenv

MnogoZnaet commented 5 years ago

Same problem for me: gcc 5.2 python 2.7 tensorflow 1.11.0 CUDA 9.0

MnogoZnaet commented 5 years ago

If you use newer tensorflow versions > 1.10 There is an incorrect compassion of versions in Makefile that make some flags not set:

 # Is the Tensorflow version >= 1.4?
TF_VERSION_GTE_1_4 := $(shell expr `python -c 'import tensorflow as tf; print(tf.__version__)' | cut -f1,2 -d.` \>= 1.4)

I use tensorflow 1.11 which is in this case not greater than 1.4 This flags are not set because the wrong compassion:

# Set some more flags if the Tensorflow version is >= 1.4
ifeq ($(TF_VERSION_GTE_1_4), 1)
    CFLAGS += -I$(TF_INC)/external/nsync/public
    LDFLAGS := -L$(TF_LIB) -ltensorflow_framework -L/usr/local/cuda/lib64 -lcuda -lcudart
else
    LDFLAGS :=
endif

So I made a quick fix for me removing this compassion at all

sadeepj commented 5 years ago

This is fixed as of commit 69d135179ede0468574e9a732378a5890304182d

skq-5233 commented 4 years ago

Hello! When I run the sh.compile.sh command, it compiles successfully, but when I run train.py, I get an error: undefined symbol:_ZTIN10tensorflow8opkernelE. I checked a lot of information on the Internet and did not solve it. Hope you help me see what is the problem. Thanks again! ! ! ubuntu :16.04 ; nvidia-driver-440;cuda:10.0; cudnn:7.5.0; tensorflow-gpu:1.13.1; gcc/g++:5.4.0; The compile instructions are as follows: TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')

g++ -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -shared high_dim_filter.cc modified_permutohedral.cc -o high_dim_filter.so -fPIC -I $TF_INC -I$TF_INC/external/nsync/public/ -L$TF_LIB -ltensorflow_framework -O2 @sadeepj

image Thans a lot!!!