attributeerror:module ‘torch.cuda’ has no attribute ‘reset_peak_memory_stats’

报错信息:attributeerror:module ‘torch.cuda’ has no attribute ‘reset_peak_memory_stats’

应该又是版本不适配的问题。因为用的是RTX3090显卡,只支持CUDA11.0版本及以上。

解决方法:在终端中输入以下命令重新安装pytorch

Pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

你可能感兴趣的:(python,深度学习,pytorch,深度学习,pytorch,python,人工智能,神经网络)