開源點雲庫torch-points3d的嘗試

知識在於分享發表於2020-12-11

https://github.com/nicolas-chaulet/torch-points3d/tree/1.0.0
使用CUDA10.0 cudnn
pytorch==1.3.1
torchvision==0.4.2 

安裝依賴:
~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python -mpip install -i https://pypi.douban.com/simple/ --trusted-host pypi.douban.com -r torch-points3d-1.0.0/requirements.txt
提前將依賴中的certifi==2020.4.5.1刪除,因為這個不同電腦有不同配置
還有,這裡面並不是所有的依賴都需要,有一些,比如numpy,我們的環境肯定已經有了,沒必要升級,有可能影響別的專案


設定某塊卡訓練
train.py:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'

1.安裝外掛視覺化
jupyter labextension install @pyviz/jupyterlab_pyviz
實現:
~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python -mpip install jupyterlab -i https://pypi.tuna.tsinghua.edu.cn/simple

~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/jupyter labextension install @pyviz/jupyterlab_pyviz

或者視覺化程式:
torch-points3d/forward_scripts/notebooks/viz_shapenet.ipynb

~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/tensorboard --logdir outputs/~/tensorboard

2.例子測試:
~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python forward_scripts/forward.py

3.pycharm訓練出現錯誤:
ImportError: libcusparse.so.10.0: cannot open shared object file: No such file or directory
解決方案:
sudo ldconfig /usr/local/cuda/lib64

4.出現錯誤,但是不影響訓練:
ERROR:root:The testing module requires faiss. You can install the GPU version with the command 'conda install faiss-gpu -c pytorch' 
                        or the CPU version with 'conda install faiss-cpu -c pytorch'. Learn more at https://github.com/facebookresearch/faiss/blob/master/INSTALL.md
解決方案:
~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python -mpip install faiss-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple

~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python -mpip uninstall torch-points-kernels
~/.conda/envs/py3_6-pytorch1_1_0_temp/bin/python -mpip install torch-points-kernels --no-cache -v

相關文章