              pooled = K.std(inputs, axis=[2, 3])
          return pooled
  
  
  class L2_normalize(keras.layers.Layer):  # type:ignore[name-defined]  # pylint:disable=invalid-name
      """ Normalizes a tensor w.r.t. the L2 norm alongside the specified axis.
  
      Parameters
      ----------
      axis: int
          The axis to perform normalization across
 
</s> remove         if self.data_format == 'channels_last':
            pooled = K.std(inputs, axis=[1, 2])
        else:
            pooled = K.std(inputs, axis=[2, 3])
        return pooled

 </s> add  </s> remove         if self.data_format == 'channels_last':
            pooled = K.min(inputs, axis=[1, 2])
        else:
            pooled = K.min(inputs, axis=[2, 3])
        return pooled
 </s> add         if self.data_format == "channels_first":
            batch, channels, rows, columns = input_shape
            return (batch,
                    channels // (self.scale_factor ** 2),
                    rows * self.scale_factor,
                    columns * self.scale_factor)
        batch, rows, columns, channels = input_shape
        return (batch,
                rows * self.scale_factor,
                columns * self.scale_factor,
                channels // (self.scale_factor ** 2)) </s> remove class _GlobalPooling2D(keras.layers.Layer):  # type:ignore[name-defined]
    """Abstract class for different global pooling 2D layers.
 </s> add class SubPixelUpscaling(tf.keras.layers.Layer):
    """ Sub-pixel convolutional up-scaling layer. </s> remove         if len(input_shape) != 4:
            raise ValueError('Inputs should have rank ' +
                             str(4) +
                             '; Received input shape:', str(input_shape))

        if self.data_format == 'channels_first':
            height = None
            width = None
            if input_shape[2] is not None:
                height = input_shape[2] * self.size[0]
            if input_shape[3] is not None:
                width = input_shape[3] * self.size[1]
            channels = input_shape[1] // self.size[0] // self.size[1]

            if channels * self.size[0] * self.size[1] != input_shape[1]:
                raise ValueError('channels of input and size are incompatible')

            retval = (input_shape[0],
                      channels,
                      height,
                      width)
        elif self.data_format == 'channels_last':
            height = None
            width = None
            if input_shape[1] is not None:
                height = input_shape[1] * self.size[0]
            if input_shape[2] is not None:
                width = input_shape[2] * self.size[1]
            channels = input_shape[3] // self.size[0] // self.size[1]

            if channels * self.size[0] * self.size[1] != input_shape[3]:
                raise ValueError('channels of input and size are incompatible')
 </s> add         if self.data_format == 'channels_last':
            pooled = K.min(inputs, axis=[1, 2])
        else:
            pooled = K.min(inputs, axis=[2, 3])
        return pooled
        if data_format == "channels_first":
            inputs = tf.transpose(inputs, (0, 3, 1, 2))
              pooled = K.std(inputs, axis=[2, 3])
          return pooled
  
  
        if data_format == "channels_first":
            inputs = tf.transpose(inputs, (0, 3, 1, 2))
        if data_format == "channels_first":
            inputs = tf.transpose(inputs, (0, 3, 1, 2))
  
      Parameters
      ----------
      axis: int
          The axis to perform normalization across
keep keep keep keep replace replace keep keep keep keep keep
 Training fixes:
  - Fix mixed precision layer storing and switching
  - typofix in _requirements_base.txt
  - lib.model.layers - cleanup, docs and tests fixes
  - lib.model.nn_blocks - typing fixes 
lib/model/layers.py