AttributeError: Can't get attribute 'FlattenedLoss' on <module 'fastai.layers' from 'E:\Program Files\Python39\lib\site-packages\fastai\layers.py'>
改为了全路径还是不行
torch.load()使用中报错layers.py
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
CSDN专家-HGJ 2021-10-21 19:42关注从网上讨论看,应该是运行的代码与fastai版本不匹配造成的(比如较高版本fastai运行用较低版本编写的代码出现问题),可以查看了下fastai版本,通过升级或降低版本试试。
参考这里:AttributeError: Can't get attribute 'FlattenedLoss' · Issue #2748 · fastai/fastai · GitHub I have following installed on my ubuntu 18 fastai 2.0.6 torch 1.6.0+cpu torchvision 0.7.0+cpu I am trying to load my export.pkl file in following way but it is not being loaded and getting following exception: from fastai import basics b...
https://github.com/fastai/fastai/issues/2748
评论 打赏 举报解决 1无用