当前位置:网站首页>torch. Load load model error: can't get attribute 'VAE_ vc‘ on <module ‘__ main__‘ From 'xxxx() run file path‘
torch. Load load model error: can't get attribute 'VAE_ vc‘ on <module ‘__ main__‘ From 'xxxx() run file path‘
2022-06-29 12:00:00 【Wsyoneself】
Error reason :torch.load When loading the model, you actually need to refer to the network structure to build an instance object corresponding to the network , Reference source required class, Therefore, the reason for this error is the network class Not in the run file
solve :
(1) Simple solution : The Internet class Copy the code into the run file
(2) Refer to my blog :python Dynamically import self written modules or classes _Wsyoneself The blog of -CSDN Blog
Import all the contents of the file where the network is located , Such as
from xxxx import *Test again to run correctly ~
边栏推荐
猜你喜欢
随机推荐
合约量化交易系统玩法开发 (现成案例分析)
Exclusive interview with head of suss NIFT: the future of Web3 is inseparable from the governance of "everyone for me, I for everyone"
易快报:我们用 Zadig 实现万次构建部署,聪明运维,释放开发生产力
ESP8266简介:三种编程方式「建议收藏」
Pytorch - 分布式通信原语(附源码)
How to find out the wrong mobile number when querying MySQL
启泰观察:职业精英创业必踩巨坑之 --- 学习效果坑
ShanDong Multi-University Training #3
【毕业季】总结过去,展望未来
Jerry's WiFi interferes with Bluetooth [chapter]
Windwos10安装sshd服务
Qt学习15 用户界面与业务逻辑的分离
leetcode刷题:字符串07(重复的子字符串)
shell判断命令是否执行成功
QT learning 15 separation of user interface and business logic
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
2022 construction worker civil engineering direction general foundation (construction worker) theoretical question bank simulation test platform operation
CICD简介[通俗易懂]
杰理之手动配对方式【篇】
Object 类——万类之父








