dataloader.py 文件源码

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

项目:flownet2-tf 作者: sampepose 项目源码 文件源码
def _decode(self, image_buffer):
        """Decodes the image buffer.
        Args:
          image_buffer: The tensor representing the encoded image tensor.
        Returns:
          A tensor that represents decoded image of self._shape, or
          (?, ?, self._channels) if self._shape is not specified.
        """
        def decode_raw():
            """Decodes a raw image."""
            return tf.decode_raw(image_buffer, out_type=self._dtype)

        image = decode_raw()
        # image.set_shape([None, None, self._channels])
        if self._shape is not None:
            image = tf.reshape(image, self._shape)

        return image
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号