使用双线性插值调整images为size.
tf.image.resize_bilinear( images, size, align_corners=False, name=None )输入图像可以是不同的类型,但输出图像总是浮点型的.
参数:
images:一个Tensor,必须是下列类型之一:int8,uint8,int16,uint16,int32,int64,bfloat16,half,float32,float64;4维的并且具有形状[batch, height, width, channels]. size:2个元素(new_height, new_width)的1维int32张量,用来表示图像的新大小. align_corners:可选的bool,默认为False;如果为True,则输入和输出张量的4个角像素的中心对齐,并且保留角落像素处的值.
(align_corners: An optional bool. Defaults to False. If true, rescale input by (new_height - 1) / (height - 1), which exactly aligns the 4 corners of images and resized images. If false, rescale by new_height / height. Treat similarly the width dimension.) name:操作的名称(可选). 返回值:
该函数返回float32类型的Tensor.