今天重新写了tfrecord,结果报这个错误:

All shapes must be fully defined: [TensorShape([Dimension(299), Dimension(299), Dimension(3)])

原因:https://stackoverflow.com/questions/35620157/how-can-i-use-values-read-from-tfrecords-as-arguments-to-tf-reshape/35630798

https://stackoverflow.com/questions/35620157/how-can-i-use-values-read-from-tfrecords-as-arguments-to-tf-reshape/35630798

tf.train.shuffle_batch 里边的参数rank必须是一样的,而我的图片rank是 【299,299,3】,而label的形状是【none,2】,这俩货rank不一样
解决方法如下:
在 tf.train.shuffle_batch 之前,把 image 从 三维降到两维,方法

image = tf.image.resize_image_with_crop_or_pad(image, 299, 299)
image = tf.reshape(image, tf.stack([299, 299, 3]))

All shapes must be fully defined: [TensorShape([Dimension(299), Dimension(299), Dimension(3)])相关推荐

  1. Tensorflow Slim入门教程(1)

    slim入门教程 slim入门教程 1. Variable 2. Layers 2.1 slim.bias_add 2.2 slim.batch_norm 2.3 slim.conv2d 2.4 sl ...

  2. object_detection源码解析-box_list

    models.research.object_detection源码解析-core.box_list box_list是一个ObjectDetection项目中,一个综合管理bounding box的 ...

  3. mtb7_参数控制要显示的维度Level of Detail Calculation_Context Filter > Fixed > Dimension > Include Exclude VizQ

    When we talk about Level of Detail (LOD) calculations in Tableau, we mean three expressions: FIXED, ...

  4. 【tensorrt之dynamic shapes】

    1.  背景 Dynamic shapes指的是我们可以在runtime(推理)阶段来指定some或者all输入数据的维度,同时,提供C++和Python两种接口.一般需要指定为dynamic的是ba ...

  5. 教你玩转CSS 尺寸 (Dimension)

    目录 所有CSS 尺寸 (Dimension)属性 CSS 尺寸 (Dimension) 属性允许你控制元素的高度和宽度.同样,它允许你增加行间距. 所有CSS 尺寸 (Dimension)属性

  6. 无监督学习:Linear Dimension Reduction(线性降维)

    一 Unsupervised Learning 把Unsupervised Learning分为两大类: 化繁为简:有很多种input,进行抽象化处理,只有input没有output 无中生有:随机给 ...

  7. dimension and x,y,z components

    class Point3 { public:     union {         struct {             int x, y, z;         };         int ...

  8. pytorch dataload 出错:: invalid argument 0: Sizes of tensors must match except in dimension 0

    错误信息:"RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got ...

  9. Dimension类

    一.基本定义 1.Dimension类封装了单个对象中组件的宽度和高度(精确到整数): 2.该类与组件的某个属性相关联: 3.由Component类和LayoutManager接口定义的一些方法将返回 ...

最新文章

  1. tomcat 7.0 linux下载,Tomcat 7.0.67 发布下载
  2. Kingbase金仓查看表空间占用率
  3. 1、user权限表详解
  4. Codeforces 140D - New Year Contest
  5. 字节跳动 java面经_字节跳动Java面经(已offer)
  6. ReviewForJob——二叉堆优先队列的实现(三种堆节点类型——int + struct HeapNode + struct HeapNode*)
  7. 数字图像处理-0.绪论
  8. 这就是即将发布的苹果刘海屏MacBook Pro样机?
  9. 教你大数据必修三大技能 快快记录下来
  10. MySQL 这三道必问面试题,你都会吗?
  11. 阶段5 3.微服务项目【学成在线】_day01 搭建环境 CMS服务端开发_21-页面查询服务端开发-Dao-分页查询测试...
  12. 计算机管理格式化硬盘,如何将电脑硬盘格式化?笔记本硬盘格式化的操作方法...
  13. 如何搭建点燃式发动机仿真模型
  14. 编制职工档案管理程序C语言,职工档案管理系统
  15. 怎样做终端安全防御?
  16. 机器学习(7)——安然数据集分析
  17. 鹏哥手把手带我刷好题 · 编程练习 · II
  18. 树莓派3B+插入电源后状态灯只有红灯常亮,无法接入屏幕
  19. 电压跟随器的作用- -电压跟屁虫有什么作用呢???
  20. Android VideoView 无法播放https网络视频问题

热门文章

  1. 虚拟机VMware Horizon Client与主机之间建立共享文件夹
  2. 进攻即是最好的防御!19 个练习黑客技术的在线网站
  3. android普通应用写u盘,android设备应用读取外接U盘设备方法
  4. Hierarchical graph representations in digital pathology
  5. React map遍历点击获取key
  6. matlab定义坐标轴范围(二维、三维)
  7. 使用线程模拟倒计时和打印当前系统时间
  8. LabVIEW控制电脑关机、休眠、注销和重启
  9. phoronix-test-suit安装与测试
  10. 在河北化工项目中安科瑞抗晃电产品的应用