成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.

简介: 成功解决raise ValueError(‘No model found in config file.‘) ValueError: No model found in config file.


目录

解决问题

解决思路

解决方法


 

 

 

 

 

解决问题

raise ValueError('No model found in config file.') ValueError: No model found in config file.

 

 

 

 

解决思路

值错误(“在配置文件中没有找到模型”)

值错误:在配置文件中找不到模型。

 

 

 

解决方法

读取与载入的方法不对,

详见DL之Keras:keras保存网络结构、网络拓扑图、网络模型(json、yaml、h5等)注意事项及代码实现

1. model.save_weights(model_file)
2. model=tf.keras.models.load_model('./easy_model.h5')

改为

model=model.load_weights('./easy_model.h5')

 

相关文章
IDEA添加Swagger2:Parameter 0 of method linkDiscoverers in org. springframework hateoas.config.Hateoasconfiguration required a single bean, but 15 were found:
IDEA添加Swagger2:Parameter 0 of method linkDiscoverers in org. springframework hateoas.config.Hateoasconfiguration required a single bean, but 15 were found
|
7月前
|
JavaScript
Parsing error: No Babel config file detected for 。。
Parsing error: No Babel config file detected for 。。
169 3
|
监控 Dubbo 搜索推荐
No application config found or it‘s not a valid config! Please add <dubbo:application name=“...“ />
No application config found or it‘s not a valid config! Please add <dubbo:application name=“...“ />
1332 1
|
7月前
|
NoSQL Redis
进行主从复制时出现的异常FATAL CONFIG FILE ERROR (Redis 6.2.6)Reading the configuration file
进行主从复制时出现的异常FATAL CONFIG FILE ERROR (Redis 6.2.6)Reading the configuration file
408 0
|
7月前
|
关系型数据库 MySQL 数据库
Mysql-错误处理: Found option without preceding group in config file
Mysql-错误处理: Found option without preceding group in config file
857 0
|
7月前
|
Dubbo 应用服务中间件
【Default config not found for ApplicationConfig】的一种解决方案
【Default config not found for ApplicationConfig】的一种解决方案
751 0
|
7月前
Parsing error: No Babel config file detected for XXXXX
Parsing error: No Babel config file detected for XXXXX
|
关系型数据库 MySQL Linux
DVWA CentOS Could not connect to the MySQL service. Please check the config file.
DVWA CentOS Could not connect to the MySQL service. Please check the config file.
78 0
|
关系型数据库 MySQL 数据库
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error
1285 0