          base_config = super().get_config()
          return dict(list(base_config.items()) + list(config.items()))
  
  
  class _GlobalPooling2D(keras.layers.Layer):  # type:ignore[name-defined]
      """Abstract class for different global pooling 2D layers.
  
      From keras as access to pooling is trickier in tensorflow.keras
      """
      def __init__(self, data_format=None, **kwargs):
          super().__init__(**kwargs)
 
</s> remove         self.input_spec = keras.layers.InputSpec(ndim=4)
 </s> add  </s> remove 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.
 </s> add         if data_format == "channels_first":
            inputs = tf.transpose(inputs, (0, 3, 1, 2)) </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         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 isinstance(layer, KModel):
 </s> add         if isinstance(layer, kmodels.Model):
class SubPixelUpscaling(tf.keras.layers.Layer):
    """ Sub-pixel convolutional up-scaling layer.
          base_config = super().get_config()
          return dict(list(base_config.items()) + list(config.items()))
  
  
class SubPixelUpscaling(tf.keras.layers.Layer):
    """ Sub-pixel convolutional up-scaling layer.
class SubPixelUpscaling(tf.keras.layers.Layer):
    """ Sub-pixel convolutional up-scaling layer.
  
      From keras as access to pooling is trickier in tensorflow.keras
      """
      def __init__(self, data_format=None, **kwargs):
          super().__init__(**kwargs)
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