tf.image.convert_image_dtype 注意
image: 3-D Tensor of image. If dtype is tf.float32 then the range should be
[0, 1], otherwise it would converted to tf.float32 assuming that the range
is [0, MAX], where MAX is largest positive representable number for
int(8/16/32) data type (see `tf.image.convert_image_dtype` for details).
如果是float32,那么需要自己保证输入值在0-1之间,否则是按照除以输入类型最大值归一化的。
还没有评论,来说两句吧...