test2.py 文件源码

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

项目:neuro-stereo 作者: lugu 项目源码 文件源码
def read_and_decode(filename_queue):
  reader = tf.TFRecordReader()
  _, serialized_example = reader.read(filename_queue)
  features = tf.parse_single_example(
      serialized_example,
      # Defaults are not specified since both keys are required.
      features={
          'image_left': tf.FixedLenFeature([], tf.string),
          'image_right': tf.FixedLenFeature([], tf.string),
      })

  image_left = tf.decode_raw(features['image_left'], tf.uint8)
  image_right = tf.decode_raw(features['image_right'], tf.uint8)
  width = 960
  height = 540
  depth = 4
  image_left.set_shape([width*height*depth])
  image_right.set_shape([width*height*depth])

  return image_left, image_right
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号