当前位置:网站首页>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 ~
边栏推荐
猜你喜欢

稳定币风险状况:USDT 和 USDC 安全吗?
![[pbootcms模板]作文网站/文档下载网站源码](/img/6e/51bbb4ce961defa4abd098ff3af21f.jpg)
[pbootcms模板]作文网站/文档下载网站源码

QT learning 09 calculator interface code reconstruction

妙!妙盈科技全面实施 Zadig 助力容器化建设,全面拥抱 Kubernetes 和云原生

Qt学习10 初探 Qt 中的消息处理

镜像漏洞扫描工具:Trivy

Qt学习07 Qt中的坐标系统
![Jerry's configuration of TWS cross pairing [chapter]](/img/35/a041093ce3dab8e2739bbc1466ba29.png)
Jerry's configuration of TWS cross pairing [chapter]

Jericho's position on initiating the connection back to the opposite ear: 【 chapter 】

什么是外链和内链?
随机推荐
Unity learning notes --vector3 how to set default parameters
深入理解 volatile 关键字
初次使用 eolink 感受
MATLAB Gui 实现点击按钮,打开文件对话框,导入图片功能
杰理之关于 TWS 配对方式配置【篇】
【高并发】缓存思路
How to identify the exact length and width of the contour
Oracle expands distributed cloud services to bring comprehensive public cloud services to more customers
二叉树递归与迭代
[HBZ sharing] the principle of reentrantlock realized by AQS + CAS +locksupport
equals提高执行速度/性能优化
Oracle NetSuite 助力 TCM Bio,洞悉数据变化,让业务发展更灵活
Information technology application and innovation professionals (database) intermediate training hot enrollment (July 6-10)
QT learning 15 separation of user interface and business logic
mysql 1146错误[通俗易懂]
什么是外链和内链?
Qt学习03 Qt的诞生和本质
Binary tree recursion and iteration
又拍云 Redis 的改进之路
Numpy的ndarray数组基础