fastai执行ImageCleaner时报错'Tensor' object has no attribute 'ndim' 解决方案

fastai在执行ImageCleaner和interp.plot_top_losses时都会报错’Tensor’ object has no attribute ‘ndim’ 。

解决方法:

升级pytorch到1.3.1版本,再安装与你的CUDA同版本的cudatoolkit

具体步骤:

conda uninstall pytorch torchvision
然后:conda install pytorch=1.3.1
接着:conda install torchvision -c pytorch
conda install cudatoolkit=10.1 -c pytorch(注意这里的cudatoolkit版本需要与你的cuda相一致。)
最后:conda install fastai -c fastai
以上。

你可能感兴趣的:(深度学习,pytorch)