问题:

运行程序报错:

AttributeError: module 'torch.nn' has no attribute 'GELU'

方法:

import torch.nn.functional as F

把nn.RELU改为F.gelu

 

参考:

https://www.cnblogs.com/owlowl/p/13293391.html

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐