报错:AttributeError: module ‘torch.nn‘ has no attribute ‘GELU‘
报错:AttributeError: module 'torch.nn' has no attribute 'GELU'
·
问题:
运行程序报错:
AttributeError: module 'torch.nn' has no attribute 'GELU'
方法:
import torch.nn.functional as F
把nn.RELU改为F.gelu
参考:
更多推荐
已为社区贡献2条内容
所有评论(0)