AssertionError: Some objects had attributes which were not restored:
Environment
- TensorFlow 2.0.0
- Win10
- Python 3.6
错误代码
Traceback (most recent call last):File "D:/WData/Development/deep-learning-for-image-processing-master/tensorflow_classification/Test6_mobilenet/train_tables_classification_predict.py", line 65, in <module>model.load_weights('pretrain_weights.ckpt')File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\keras\engine\training.py", line 2193, in load_weightsstatus.assert_nontrivial_match()File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\tracking\util.py", line 1006, in assert_nontrivial_matchreturn self.assert_consumed()File "C:\Users\12575\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\training\tracking\util.py", line 983, in assert_consumed"".join(unused_attribute_strings)))
AssertionError: Some objects had attributes which were not restored:<tf.Variable 'inverted_residual_17/expanded_conv/depthwise/depthwise_kernel:0' shape=(3, 3, 32, 1) dtype=float32, numpy=
array([[[[ 0.05756447],[-0.0370553 ],[-0.11440262],[-0.06672723],[ 0.11394142],[ 0.13377915],[-0.03364427],
.
.
.1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,1., 1., 1., 1., 1., 1., 1., 1.], dtype=float32)>: ['inverted_residual_33/expanded_conv/expand/BatchNorm/moving_variance']
问题分析
在测试代码中定义了测试函数,且在同一个文件中使用了这个函数。
解决方法
删除在测试代码中使用的测试函数。
AssertionError: Some objects had attributes which were not restored:相关推荐
- A Data Access Layer to persist business objects using attributes and reflection - Part II [无常译]...
A Data Access Layer to persist business objects using attributes and reflection - Part II By xicolok ...
- A Data Access Layer to persist business objects using attributes and reflection - Part III [无常译]...
下载源代码 目录: 第一部分 第二部分 第三部分 前言 这是本系列最后一篇文章.在第一篇中我们知道了自给使用特性来给类添加声明信息.第二篇中我们已经知道如何使用System.Reflection na ...
- SAP Commerce的Runtime Attributes
Runtime attributes allow you to extend the capabilities of Integration Objects. 扩展integration object ...
- My Python Summary
Python的反射机制 简单的说通过dir(classname)可以获取类的方法及属性等,而通过globals()可以得到py文件中类Map,可以通过globals()[key]的方式创建对象,下所示 ...
- Python DB-API 2.0规范
Python DB-API 2.0规范 PEP: 249 标题: Python Database API Specification v2.0 版本: 83893e13db91 修改日期: 2008 ...
- All about OpenGL ES 2.x – (part 2/3)(转载)
来源: http://db-in.com/blog/2011/02/all-about-opengl-es-2-x-part-23/ Very welcome back, my friends! No ...
- /dev、/sys/dev 和/sys/devices 和udev的关系
/dev,设备文件存储目录,应用程序通过对这些文件的读写和控制,可以访问实际的设备: /sys/devices目录,按照设备挂接的总线类型,组织成层次结构,保存了系统所有的设备:是文件系统管理设备的最 ...
- Paper:《Multimodal Machine Learning: A Survey and Taxonomy,多模态机器学习:综述与分类》翻译与解读
Paper:<Multimodal Machine Learning: A Survey and Taxonomy,多模态机器学习:综述与分类>翻译与解读 目录 <Multimoda ...
- Springboot使用AOP记录请求日志和返回数据
首先是日志表结构 DROP TABLE IF EXISTS `protal_logvo`; CREATE TABLE `protal_logvo` (`id` varchar(255) NOT NUL ...
最新文章
- HTML教程--多页面窗体
- python gui 可视化开发工具_用c语言输出九九乘法口诀表
- 《信息系统项目管理师软考辅导——3年真题详解与全真模拟》主要创新点、关注点...
- Netty 实现 websocket
- python 3d绘图 拖动_使用python-matplotlib连续3D绘图(即图形更新)?
- SQLServer之创建数据库架构
- C++接口工程实践:有哪些实现方法?
- 使用Hyper-v 创建Windows Server 2008 Cluster(二)
- oracle监听启动很慢
- ant指定servlet版本_[转载]程序开发常见错误
- 259 [LeetCode] 3Sum Smaller 三数之和较小值
- C++数据类型基础知识
- 为什么哲学是最难的学科_为什么来读哲学系?
- 泰凌微TLSR8258烧录
- Unity体积光实现浅析
- 2023兔年头像框制作生成小程序源码+多模板/抓住红利
- node.js笔记第一天
- 【高性能计算】HPC概述
- 百度地图 - 添加区划覆盖物 - 循环打点
- eclipse运行出现unable to launch 错误