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:相关推荐

  1. 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 ...

  2. A Data Access Layer to persist business objects using attributes and reflection - Part III [无常译]...

    下载源代码 目录: 第一部分 第二部分 第三部分 前言 这是本系列最后一篇文章.在第一篇中我们知道了自给使用特性来给类添加声明信息.第二篇中我们已经知道如何使用System.Reflection na ...

  3. SAP Commerce的Runtime Attributes

    Runtime attributes allow you to extend the capabilities of Integration Objects. 扩展integration object ...

  4. My Python Summary

    Python的反射机制 简单的说通过dir(classname)可以获取类的方法及属性等,而通过globals()可以得到py文件中类Map,可以通过globals()[key]的方式创建对象,下所示 ...

  5. Python DB-API 2.0规范

    Python DB-API 2.0规范 PEP:  249 标题: Python Database API Specification v2.0 版本: 83893e13db91 修改日期: 2008 ...

  6. 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 ...

  7. /dev、/sys/dev 和/sys/devices 和udev的关系

    /dev,设备文件存储目录,应用程序通过对这些文件的读写和控制,可以访问实际的设备: /sys/devices目录,按照设备挂接的总线类型,组织成层次结构,保存了系统所有的设备:是文件系统管理设备的最 ...

  8. Paper:《Multimodal Machine Learning: A Survey and Taxonomy,多模态机器学习:综述与分类》翻译与解读

    Paper:<Multimodal Machine Learning: A Survey and Taxonomy,多模态机器学习:综述与分类>翻译与解读 目录 <Multimoda ...

  9. Springboot使用AOP记录请求日志和返回数据

    首先是日志表结构 DROP TABLE IF EXISTS `protal_logvo`; CREATE TABLE `protal_logvo` (`id` varchar(255) NOT NUL ...

最新文章

  1. HTML教程--多页面窗体
  2. python gui 可视化开发工具_用c语言输出九九乘法口诀表
  3. 《信息系统项目管理师软考辅导——3年真题详解与全真模拟》主要创新点、关注点...
  4. Netty 实现 websocket
  5. python 3d绘图 拖动_使用python-matplotlib连续3D绘图(即图形更新)?
  6. SQLServer之创建数据库架构
  7. C++接口工程实践:有哪些实现方法?
  8. 使用Hyper-v 创建Windows Server 2008 Cluster(二)
  9. oracle监听启动很慢
  10. ant指定servlet版本_[转载]程序开发常见错误
  11. 259 [LeetCode] 3Sum Smaller 三数之和较小值
  12. C++数据类型基础知识
  13. 为什么哲学是最难的学科_为什么来读哲学系?
  14. 泰凌微TLSR8258烧录
  15. Unity体积光实现浅析
  16. 2023兔年头像框制作生成小程序源码+多模板/抓住红利
  17. node.js笔记第一天
  18. 【高性能计算】HPC概述
  19. 百度地图 - 添加区划覆盖物 - 循环打点
  20. eclipse运行出现unable to launch 错误

热门文章

  1. 数据分析概述+框架+方法+工具!
  2. QMdiSubWindow
  3. 2021学前端真的没前途了吗?
  4. Orman Clark的垂直导航菜单:CSS3版本
  5. hdu6595 概率和期望
  6. 为什么要选择106短信接口?
  7. PHP程序输入输出流
  8. css图片适应盒子大小
  9. 免费的天气查询 API 接口分享
  10. 我的极限Scrum实践