AttributeError Can‘t get attribute ‘Model‘ on module ‘main‘

AttributeError: Can’t get attribute ‘Model’ on main’>

torch.load时会出现这种错误,本质是在当前文件内运行时并没有发现Model类。

AttributeError经常是说明调用了某一个类没有的属性。

你可能感兴趣的:(pytorch,深度学习,机器学习,人工智能)