我注意到该Tensorflow Python软件包提供了解码的标准程序jpeg,png以及gif读取文件后的图像.例如png:
import tensorflow as tf
filename_queue = tf.train.string_input_producer(['/Image.png']) # list of files to read
reader = tf.WholeFileReader()
key, value = reader.read(filename_queue)
decoded_image = tf.image.decode_png(value) # use png or jpg decoder based on your files.
Run Code Online (Sandbox Code Playgroud)
但是,tiff格式解码器似乎缺失了.
那么tiff文件存在哪些解决方案?当然,我可以将输入图像转换为png,但这似乎不是一个非常聪明的解决方案.
Tensorflow Argmax的当前版本未指定“轴”和“尺寸”参数之间的区别。这是官方手册中提供的唯一信息:
tf.argmax(input, axis=None, name=None, dimension=None) {#argmax}
Returns the index with the largest value across axes of a tensor.
Args:
input: A Tensor. Must be one of the following types: float32, float64, int64, int32, uint8, uint16, int16, int8, complex64, complex128, qint8, quint8, qint32, half.
axis: A Tensor. Must be one of the following types: int32, int64. int32, 0 <= axis < rank(input). Describes which axis of the input Tensor to reduce across. For vectors, use axis = 0. …Run Code Online (Sandbox Code Playgroud)