Stay organized with collections Save and categorize content based on your preferences.

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.