【报错】
Can‘t get attribute ‘SiLU‘ on <module ‘torch.nn.modules.activation
【解决方法】
将SiLU拷贝到~/.local/lib/python3.8/site-packages/torch/nn/modules/activation.py
文件中
class SiLU(Module): # export-friendly version of nn.SiLU()
@staticmethod
def forward(x):
return x * torch.sigmoid(x)