I am getting this error, when importing _C.
ImportError: /maskrcnn-benchmark/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE
This is my machine info.
>>> torch.__version__
'1.0.1.post2'
>>> torch.version.cuda
'10.0.130'
Hi,
You have compiled maskrcnn_benchmark using a different version of PyTorch.
Try rm -rf build/ and then compiling it again with the same version, it should work once you do this.
Also, if this fixes the problem for you, do you mind adding one more entry in the TROUBLESHOOTING section?
I meet the same problem when just try importing.
>>> from maskrcnn_benchmark import _C
But when training the whole project, it is ok with torch 1.0.0, python 3.6 and cuda 9.0.
It seems I should learn more about extension.
@ZhangK9509 you'll need to import torch before you execute from maskrcnn_benchmark import _C
@dannyhung1128 import torch before from maskrcnn_benchmark import _C worked for me, but why?
@dannyhung1128 It is amazing, Can you share how you figure out this problem? Thanks.
Most helpful comment
@ZhangK9509 you'll need to import torch before you execute
from maskrcnn_benchmark import _C