TFRecords注意事项

2018-07-16  本文已影响5人  yalesaleng

注意:
   如果存储为tfrecords格式之前的原始数据类型是np.uint8,
   那么在从tfrecords文件中解码出文件时,
   一定要 img = tf.decode_raw(x, tf.uint8)!!!!
   之后再将 img转化为tf.float32格式输入到网络中(tf的网络模型默认输入是tf.float32格式)

上一篇下一篇

猜你喜欢

热点阅读