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