Skip to content

resize

Image resizing.

This layer resize an input image in (B, H, W, C).


Parameter

  • size : Integers, shape of output image will be (size[0], size[1], C).
  • scale : Floats, just like {"size": [floor(scale[0] * H), floor(scale[1] * W)]}
  • mode : String, 'bilinear' (default) or 'nearest'.
  • grid_mode : String, 'normal' (default) or 'tf'(tf.image.resize()) or 'tf_align'(tf.image.resize(align_corner=True)).
  • nearest_mode_x : String, 'undefined' (default) or 'ceil' of 'float' or 'toward_zero' or 'away_from_zero' or 'nearest_up' or 'nearest_down' or 'nearest_toward_zero' or 'nearest_away_from_zero'. Ignored if mode is not nearest.
  • nearest_mode_y : String, 'undefined' (default) or 'ceil' of 'float' or 'toward_zero' or 'away_from_zero' or 'nearest_up' or 'nearest_down' or 'nearest_toward_zero' or 'nearest_away_from_zero'. Ignored if mode is not nearest.
  • keeps_aspect_raito : Bool, whether to keep the aspect ratio.
  • padding_color : Array : Numbers, padding color.