Can't get attribute 'SiLU' on <module 'torch.nn.modules.activation
报错代码:
aaa=torch.load(w, map_location=map_location)['model'].float().fuse().eval()
原因:
torch加载的时候,会自动映射到类里面
临时解决方法:
把类SiLU的代码粘贴到activation文件中。
Can't get attribute 'SiLU' on <module 'torch.nn.modules.activation
报错代码:
aaa=torch.load(w, map_location=map_location)['model'].float().fuse().eval()
原因:
torch加载的时候,会自动映射到类里面
临时解决方法:
把类SiLU的代码粘贴到activation文件中。