0
我在使用tf.load_op_library('readmat.so')
時遇到問題,其中readmat.so
是我的自定義C++代碼。但我得到了以下錯誤:在張量流中加載自定義操作時出現未定義的符號錯誤
[email protected]:~/my_files/CRNN$ python ctpn_cl_icdar15_ch2_train_v1_7.py
Traceback (most recent call last):
File "ctpn_cl_icdar15_ch2_train_v1_7.py", line 13, in <module>
import ICDAR15_ch2_768x768 as icdar15
File "./datasets/ICDAR15_ch2_768x768.py", line 15, in <module>
readmat = tf.load_op_library('/export/home/gslin/my_files/tensorflow/bazel-bin/tensorflow/core/user_ops/readmat.so')
File "/export/home/gslin/.local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /export/home/gslin/my_files/tensorflow/bazel-bin/tensorflow/core/user_ops/readmat.so: undefined symbol: inflateInit_
符號inflateInit_
在/usr/include/zlib.h
定義,這是在readmat.cc inclued。
PS:此服務器的管理員在1周前進行系統升級後發生錯誤。我不是root用戶。
操作系統:Ubuntu 14.04 Tensorflow:R1.1
有關此問題的任何想法?
我想readmat.so沒有鏈接到libz.so.通過運行'ldd readmat.so'檢查依賴關係,並檢查是否看到libz.so. – SHR