源码:# 解析读取的样例。 features = tf.parse_single_example(dataset,features={‘image_raw‘:tf.FixedLenFeature([],tf.string),‘pixels‘:tf.FixedLenFeature([],tf.int64),‘label‘:tf.FixedLenFeature([],tf.int64)})
修改后: # 解析读取的样例。 features = tf.io.parse_single_example(dataset,features={‘image_raw‘:tf.FixedLenFeature([],tf.string),‘pixels‘:tf.FixedLenFeature([],tf.int64),‘label‘:tf.FixedLenFeature([],tf.int64)})
这样就可以了解决这个问题了。
吴裕雄--天生自然 pythonTensorFlow图形数据处理:解决module 'tensorflow' has no attribute 'parse_single_example'
原文:https://www.cnblogs.com/tszr/p/12063383.html