错误如下:
AttributeError: module 'torch.nn' has no attribute 'SiLU'
错误原因:
这个问题的原因是这个版本的torch中的torch.nn函数表里面没有这个SiLU函数,需要更高版本的torch,在官方的文档中我们就可以查看这个版本里有没有包含这个模块。
解决方法:
红框选择 torch 版本,我的版本是1.1.0,搜索框里查函数 torch.nn。
ctrl+F 跳出搜索框搜索需要的函数查不到就是没有了,因为cuda版本的限制,所以只能放弃,电脑太垃圾了呜呜呜。
引用
AttributeError: module 'torch.nn' has no attribute 'LocalResponseNorm'问题的解决办法