注意:
如果存储为tfrecords格式之前的原始数据类型是np.uint8,
那么在从tfrecords文件中解码出文件时,
一定要 img = tf.decode_raw(x, tf.uint8)!!!!
之后再将 img转化为tf.float32格式输入到网络中(tf的网络模型默认输入是tf.float32格式)
注意:
如果存储为tfrecords格式之前的原始数据类型是np.uint8,
那么在从tfrecords文件中解码出文件时,
一定要 img = tf.decode_raw(x, tf.uint8)!!!!
之后再将 img转化为tf.float32格式输入到网络中(tf的网络模型默认输入是tf.float32格式)
本文标题:TFRecords注意事项
本文链接:https://www.haomeiwen.com/subject/fdbbpftx.html
网友评论