PointNet代码复现中遇到的问题
代码来源:白勇老师的GitHub
Q:down的代码作者是在Linux上运行的,自己在Windows上可否跑通?
A:可以
RuntimeError: Could not run ‘aten::conj.out’ with arguments from the ‘CUDATensorId’ backend.
RuntimeError: Could not run ‘aten::conj.out’ with arguments from the ‘CUDATensorId’ backend. ‘aten::conj.out’ is only available for these backends: [CPUTensorId, VariableTensorId].
解决:pytorch1.4版本的问题,可以换pytorch1.5试试(btw:如果报错百度搜索不到解决办法可以去下载代码的GitHub讨论区看看有没有同样的问题,是怎么解决的)
ModuleNotFoundError: No module named ‘tqdm’
解决:pip install tqdm
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 512])
因为我的训练样本有9843个而我的batch_size=2, 9843%2=4921余1
解决:删除了一个训练样本
modelnet40_train原本是9843个样本,我删掉了一个样本剩下9842个
更新pytorch的版本
(1)在anaconda navigator里面updatable勾选pytorch apply等了二十多分钟没反应,放弃了。
(2)卸载anaconda重装
安装完anaconda,在线装pytorch很容易失败,可以选择离线安装
pytorch的离线安装
pytorch不同版本的下载地址
下载好安装包如下:
在cmd命令行中,首先进入你所创建的环境,activate(yansheng),再执行如下命令:
conda install --use-local pytorch-1.5.1-py3.8_cuda102_cudnn7_0.tar.bz2
完成后继续执行:
conda install -c local pytorch
完成pytorch的离线安装。
pytorch的卸载
conda uninstall pytorch
conda clean -p
conda环境使用基本命令
conda update -n base conda #update最新版本的conda
conda create -n xxxx python=3.5 #创建python3.5的xxxx虚拟环境
conda activate xxxx #开启xxxx环境
conda deactivate #关闭环境
conda env list #显示所有的虚拟环境
conda info --envs #显示所有的虚拟环境
终止命令行—按键盘上的“Ctrl+C”组合键
退出exit()
进入某路径:cd E:\yansheng