这是因为,您的数据是字符串数据,但有一些参数需要输入形状才能通过FixedLenFeature读取并更改函数。
' image/width ' : TF.fixedlenfeature (shape=),tf.int64, default_value=0),例如,因为宽度是常数,所以直接省略shape,但是将你的shape改为' image/encoded ' : TF.fixedlenfeature (shape==0)
e atures={ ' image/super pixel 16/class/encoded ' : TF.varlen feature (TF.int 64 ),} parsed _ features=TF.PE
参考:
https://砖局域网. zhi Hu.com/p/33223782 (推荐。 虽然很长,但是如果怎么也不懂的话,需要从一开始就看。 () )
3359 stack overflow.com/questions/53499409/tensor flow-TF record-cant-parse-serialized-example