class_docstr: A two by two nearest neighbor Keras upsampling layer.
  
  Each spatial location is expanded to at 2x2 region by replicating the same
  feature 4 times.
class_docstr_tok: ["A","two","by","two","nearest","neighbor","Keras","upsampling","layer",".","Each","spatial","location","is","expanded","to","at","2x2","region","by","replicating","the","same","feature","4","times","."]
docstr: The call function that does the actual upsampling.
docstr_tok: ["The","call","function","that","does","the","actual","upsampling","."]
code: def call(self, inputs):
      """The call function that does the actual upsampling."""
      shape = tf.shape(inputs)
      # Number of channels needs to be used from the static shape because
      # following convolutional layers need to know the numer of channels
      # statically. The rest can be dynamic.
      number_of_channels = inputs.shape[3]
      reshaped = inputs[:, :, tf.newaxis, :, tf.newaxis, :]
      upsampled = tf.tile(reshaped, (1, 1, 1, 2, 1, 2))
      return tf.reshape(
          upsampled,
          (shape[0], shape[1] * 2, shape[2] * 2, number_of_channels),
      )
  
imports: import math
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union, List
  import numpy
  import tensorflow
label_desc: Use image node_id 1 for calling the TwoByTwoNearestNeighborUpSampling obj's underlying member method code with example usage: obj.call(inputs) and returns: tf