错误代码:
AttributeError: Can't get attribute 'SiLU' on <module 'torch.nn.modules.activation' from 'C:\\softwares\\Anconda\\envs\\yolo\\lib\\site-packages\\torch\\nn\\modules\\activation.py'>
遇到这个问题,是因为torch版本太老,需要安装高版本的解决代码:
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
下载完测试一遍
import torch print(torch.cuda.is_available())
如果为true,则安装成功
