xggIoU / centernet_tensorflow_wilderface_voc

This is the unofficial implementation of the "CenterNet:Objects as Points".Just a simple try with self-modified shufflenetv2 and yolov3.If you want better results, you need more experiments.
MIT License
111 stars 25 forks source link

List of Tensors when single Tensor expected #21

Open huang6886 opened 5 years ago

huang6886 commented 5 years ago

您好,为什么我用您的工程训练时一直报“List of Tensors when single Tensor expected”的错误呢?我理解应该是tfrecord的地址没有配置对,导致在read的时候出问题,但是我已经在cfg里面修改过了啊,不清楚进一步如何处理,还请指教

xggIoU commented 5 years ago

应该是在用tf.data的时候出了问题,最好贴个这部分代码我瞅瞅

huang6886 commented 5 years ago

您好,我完全用的您img2tfrecords这里的代码,用parse-tfrecords验证时,在features = {"img_raw": tf.FixedLenFeature([], tf.string), "label": tf.FixedLenFeature([],tf.string), "width": tf.FixedLenFeature([], tf.int64), "height": tf.FixedLenFeature([], tf.int64)} parsed_features = tf.parse_single_example(example_proto, features) img = parsed_features["img_raw"] img = tf.decode_raw(img, tf.uint8) width=parsed_features["width"] height=parsed_features["height"] img=tf.reshape(img,[height,width,3]),这里出问题,我怀疑是解析的问题,因为我的tfrecord的地址是正确的,能否给予指导?谢谢

xggIoU commented 5 years ago

代码我是验证过上传的,应该是没问题的。

huang6886 commented 5 years ago

您好,我反复测试过,一直是这里的问题啊,能否给我个邮箱,我传您我转的tfrecord,或者您给我提供一个您转的

xggIoU commented 5 years ago

1079903174@qq.com 制作个十来张图的records就好。

huang6886 commented 5 years ago

好的,谢谢,已发送,期待您的答复

MenSanYan commented 5 years ago

@huang6886 我也遇到了这个问题,可以把train.py文件里的第25行“img = tf.reshape(img, tf.convert_to_tensor([height, width, 3]))”里的形状强制转化为tensor。之后就发现没问题了。