赞
踩
在用dataset读取tfrecord的时候,看到别人的代码里面基本都有tf.data.Dataset.map()
这个部分,而且前面定义了解析tfrecord的函数decord_example(example)
之后,在后面的的map里面直接就dataset.map(decord_example)
这样使用,并没有给example
赋值。
具体代码在这里:
def decode_example(example, resize_height, resize_width, label_nums):
dics={
'image_raw':tf.FixedLenFeature([],tf.string),
'label':tf.FixedLenFeature([],tf.int64)
}
parsed_example = tf.parse_single_example(serialized=example, features=dics
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。