convert.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:ML-Study 作者: corona10 项目源码 文件源码
def read_raw_images(sess, data_set):
    filename = ['./data/' + data_set + '_data.bin']
    filename_queue = tf.train.string_input_producer(filename)
    print filename
    record_bytes = (FLAGS.height) * (FLAGS.width) * FLAGS.depth + 1
    image_bytes = (FLAGS.height) * (FLAGS.width) * FLAGS.depth
    reader = tf.FixedLengthRecordReader(record_bytes=record_bytes)
    key, value = reader.read(filename_queue)
    record_bytes = tf.decode_raw(value, tf.uint8)
    #record_label = tf.decode_raw(value, tf.int32)
    tf.train.start_queue_runners(sess=sess)
    for i in range(0, 10):
        result = sess.run(record_bytes)
        print i, result[0], len(result)
        image = result[1:len(result)]
        print image
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号