Closed ysh329 closed 6 years ago
@tqchen
@piiswrong Besides, I tested my other codes( make inference
). I found that Segment Fault (core dumped)
appears when using cv2
, such as cv2.imread
or cv2.resize
. When I replaced cv2.imread
with skimage.io.imread
or skimage
's resize
, it's okay.
@piiswrong I found it seems about libcudart
OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory. However, I tried to ldd
my libmxnet.so
file, it's okay to find this libcudart
file.
yuanshuai@linux-W580-G20:~/code/mxnet_inference/ccs/finetune-models$ sudo ./run_finetune_script.sh
[resnet-200-train-add-seg-224-lr-0.01]
Traceback (most recent call last):
File "run_finetune.py", line 16, in <module>
import mxnet as mx
File "/usr/local/lib/python2.7/dist-packages/mxnet/__init__.py", line 7, in <module>
from .base import MXNetError
File "/usr/local/lib/python2.7/dist-packages/mxnet/base.py", line 43, in <module>
_LIB = _load_lib()
File "/usr/local/lib/python2.7/dist-packages/mxnet/base.py", line 35, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory
yuanshuai@linux-W580-G20:~/code/mxnet_inference/ccs/finetune-models$ ldd ~/code/mxnet/lib/libmxnet.so | grep cudart
libcudart.so.8.0 => /usr/local/cuda-8.0/lib64/libcudart.so.8.0 (0x00007f043efd7000)
yuanshuai@linux-W580-G20:~/code/mxnet_inference/ccs/finetune-models$
But in fact, I think it doesn't matter libcudart
. I think this problem directly related to opencv
.
The same problem occurs to me!
import cv2 before import mxnet will solve this issue
@fighting-liu Very thanks my brother. I change a way using Docker to fix it.
temporary solution
I fine-tune pretrained resnet-200 on myself data. I referred tutorial codes from docs about finetune.