yolov5踩坑系列-1(error:‘Hardswish‘ object has no attribute ‘inplace‘)

yolov5项目github地址:https://github.com/ultralytics/yolov5/

在跑test.py的时候报错:torch.nn.modules.module.ModuleAttributeError: 'Hardswish' object has no attribute 'inplace'

解决方案:

将上图中的代码去掉self.inplace即可

版权声明:本文为CSDN博主「ynxdb2002」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/ynxdb2002/article/details/109697772

ynxdb2002

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐