tf.keras.layers.UpSampling2D

View source on GitHub

Upsampling layer for 2D inputs.

Inherits From: Layer

tf.keras.layers.UpSampling2D(
    size=(2, 2), data_format=None, interpolation='nearest', **kwargs
)

Repeats the rows and columns of the data by size[0] and size[1] respectively.

Arguments:

Input shape:

4D tensor with shape: - If data_format is "channels_last": (batch, rows, cols, channels) - If data_format is "channels_first": (batch, channels, rows, cols)

Output shape:

4D tensor with shape: - If data_format is "channels_last": (batch, upsampled_rows, upsampled_cols, channels) - If data_format is "channels_first": (batch, channels, upsampled_rows, upsampled_cols)