【tensorflow】Input to reshape is a tensor with xxx values, but the requested shape requires a multipl
来源:互联网 发布:伺服电机编程 编辑:程序博客网 时间:2024/06/07 18:10
今天写了一个简单的3DCNN,结果在跑的时候出现一个问题,
tensorflow.python.framework.errors.InvalidArgumentError: Input to reshape is a tensor with xxx values, but the requested shape requires a multiple of xxx values
好气!!
错误定位到了加载数据那里。
感觉上应该数输入数据的shape处理出了点问题,但我检查了好几遍,都没发现哪里写错了。
也查了很多博客,也验证了我的猜想,就是shape出了问题。
这个地方指出,
然后我又仔细推导了一遍我的卷积、池化操作,看shape的改变是否对应,终于发现了问题,我的池化操作,本来步长应该是[1,1,2,2,1]的,结果我步长都写作了1,结果自然导致我的数据shape无法对应,修改后错误解决。
关键是我检查好几遍才发现这个步长写错,是因为我把池化操作封装在一个函数中,每次调用函数我默认我是写的步长是对的,就没有仔细检查,真是罪过啊!!
所以说,出现这种类似的问题,一般都是你数据shape搞错了,认真手推一波,一定能发现哪里写错的。
以此为戒,记录自己的粗心大意。
阅读全文
0 0
- 【tensorflow】Input to reshape is a tensor with xxx values, but the requested shape requires a multipl
- tensorflow.python.framework.errors.InvalidArgumentError: Input to reshape is a tensor with xxx value
- 关于input to reshape is a tensor 的问题
- errors_impl.InvalidArgumentError: Input to reshape is a tensor
- The goal you specified requires a project to execute but there is no POM in 错误
- Vagrant is attempting to interface with the UI in a way that requires a TTY
- tensorflow:如何将tensor A 的形状reshape为tensor b 的形状
- The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- The goal you specified requires a project to execute but there is no POM in this directory...
- [ERROR] The goal you specified requires a project to execute but there is no POM in this directory
- 访问嵌入式网页出错:The requested URL '/' resolves to a file which is marked executable but is not a CGI file
- A query with lob's requires oci8 mode but oci7 mode is used plsql developer
- a query with LOB's requires OCI8 mode, but OCI7 mode is used 解决方法
- Requires development platform O but this is a release platform
- PL/SQL 报错:A query with LOB's requires OCI8 mode, but OCI7 mode is used
- PL/SQL 报错:A query with LOB's requires OCI8 mode, but OCI7 mode is used
- 虚拟机遇到的问题
- 个人总结5
- Java 打印流PrintWriter
- 课堂练习4(第四周)
- I2C和EEPROM
- 【tensorflow】Input to reshape is a tensor with xxx values, but the requested shape requires a multipl
- spring-boot启动配置及cmd安装jar包方法
- Java 序列流
- C#图书管理系统完整源码
- Caffe初始数据可视化
- 第4章 烧写OpenWrt固件
- 初识多线程问题
- python 频率直方图
- 2017.10.15离线赛总结