问题报错
题目有长度限制,完整报错为ValueError: Cannot reshape a tensor with 173056 elements to shape [1,208,208,3] (129792 elements) for '{ {node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](per_image_standardization, Reshape/shape)' with input shapes: [208,208,4], [4] and with input tensors computed as partial shapes: input[1] = [1,208,208,3].
(查看解决办法可直接跳到最下面)
出现此报错情况是在做神经网络图像分类训练完模型后,进行测试test模块输入jpg图片文件分类时,出现的错误。报错大致意思为:不能对一个包含173056个元素的张量进行重塑[1,208,208,3](129792个元素)...
在网上没发现与之匹配的解决方法,然后就根据报错分析
首先找到是reshape重塑问题,源代码用到的是tf.reshape
image = tf.c