登录社区云,与社区用户共同成长
邀请您加入社区
报错: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
参考:
https://www.cnblogs.com/owlowl/p/13293391.html
为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。
更多推荐
华为云致力推进全域Serverless时代,引领技术创新,赋能行业实践
基于Serverless服务构建千万车辆数据实时处理的车联网业务
O3使能伙伴服务作业平台维护作业专题
扫一扫分享内容
所有评论(0)