tfm.vision.spatial_transform_ops.nearest_upsampling

Nearest neighbor upsampling implementation.

data A tensor with a shape of [batch, height_in, width_in, channels].
scale An integer multiple to scale resolution of input data.
use_keras_layer If True, use keras Upsampling2D layer.

data_up A tensor with a shape of [batch, height_inscale, width_inscale, channels]. Same dtype as input data.