我试图以与过去在其他机器中多次相同的方式运行TF对象检测API(相同的Dockerfile设置) . 这次,当试图调用 model_main.py
时,返回的所有内容都是 Segmentation fault (core dumped)
.
我走过 model_main.py
,发现这个段错误发生得非常早,在 from object_detection import model_lib
行 . 我怎样才能了解为什么会发生这种情况?我有这个核心转储文件,但我'm not sure how I can use this to figure out more about what caused this segfault. GPU/versions I'使用的是:
Ubuntu 16.04
NVIDIA K80
CUDA 9.0
cuDNN 7.3.1
Python 3.6.7
Tensorflow 1.10
我也可以毫无问题地导入TensorFlow并运行我已成功找到的基本测试:
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
with tf.Session() as sess:
print (sess.run(c))
任何意见是极大的赞赏!
Edit: Sorta-kinda解决了 . 在 model_lib.py
中,导致错误的行是 from object_detection import eval_util
. 如果我修改此文件以使此行是最后一次导入而不是第一次导入,则此段错误将消失 . 不知道为什么,所以如果有人知道我真的有兴趣听 .