W tensorflow/core/framework/op_kernel.cc:1192] Invalid argument: Name: <unknown>, Key: image/landmark, Index: 0. Number of float values != expected. Values size: 10 but output shape: [40]
源代码为:
image_batch_array, label_batch_array, bbox_batch_array,landmark_batch_array
= sess.run([image_batch, label_batch, bbox_batch,landmark_batch])
tensorflow 使用的训练数据是通过 TFRecord 格式的文件进行 读入和读出的,所以 报错的原因是因为输入输出 指定的格式或者大小不一致产生的。
导致此错误的原因可能有两个方面:
1.写入tfrecord 文件的时候 指定格式和array 的结构没有处理好
2.读取tfrecord 文件的方法中feature 或者 arraysize没有跟tfrecord文件匹配