I am making a classifier using PyTorch, where torch version is 1.0.1, installed numpy, pandas, and this -
!pip install -q Pillow==4.3.0
!pip install -q PIL
!pip install -q image
import PIL
This all I am doing in Google Colab and the picture datasets, I am connecting from GDrive. When I connect, there is no problem. But after connecting, when I import all datasets, transforms, models, giving me error -
----> 6 from torchvision import datasets, transforms, models
----> 2 from torchvision import _C
ImportError: /usr/local/lib/python3.6/dist-packages/torchvision/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1019UndefinedTensorImpl10_singletonE
How to fix this, this is weird? Have I done something wrong?
So, in my case, you can see that this is clearly for torch vision, "/usr/local/lib/python3.6/dist-packages/torchvision/_C" and There was some text like, torchvision 0.3.0 does not support torch 1.0.0, it has a minimum requirement of torch 1.1.0. So, I upgraded to torch 1.1.0, by uninstalling the previous torch and I am good to go.
This is the code to uninstall -
!pip uninstall -y pytorch
!pip uninstall -y torch
!pip uninstall -y torch
!pip uninstall -y torch
Well, what is the use of fastai? Means you have the issue when GPU in colab is on? When running it in TPU, it works fine?
conda install -c pytorch pytorch-nightly torchvision cudatoolkit=10.0
then when I train FCOS based maskrcnn_benchmark, run
" python -m torch.distributed.launch
--nproc_per_node=8
--master_port=$((RANDOM + 10000))
tools/train_net.py
--skip-test
--config-file configs/fcos/fcos_R_50_FPN_1x.yaml
DATALOADER.NUM_WORKERS 2
OUTPUT_DIR training_dir/fcos_R_50_FPN_1x
"
from maskrcnn_benchmark import _C ImportError: maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd
or from torchvision import _C.
this do run by:
conda uninstall pytorch
conda uninstall pytorch-nightly
conda uninstall torch
codna uninstall torchvision
then:
conda install -c pytorch pytorch-nightly torchvision cudatoolkit=10.0
pip install torchvision==0.2.2
successfully!!
Thanks
Most helpful comment
conda install -c pytorch pytorch-nightly torchvision cudatoolkit=10.0
then when I train FCOS based maskrcnn_benchmark, run
" python -m torch.distributed.launch
--nproc_per_node=8
--master_port=$((RANDOM + 10000))
tools/train_net.py
--skip-test
--config-file configs/fcos/fcos_R_50_FPN_1x.yaml
DATALOADER.NUM_WORKERS 2
OUTPUT_DIR training_dir/fcos_R_50_FPN_1x
"
from maskrcnn_benchmark import _C ImportError: maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd
or from torchvision import _C.
this do run by:
conda uninstall pytorch
conda uninstall pytorch-nightly
conda uninstall torch
codna uninstall torchvision
then:
conda install -c pytorch pytorch-nightly torchvision cudatoolkit=10.0
pip install torchvision==0.2.2
successfully!!