class_docstr: Layer that computes the standard deviation across an axis of its inputs.
class_docstr_tok: ["Layer","that","computes","the","standard","deviation","across","an","axis","of","its","inputs","."]
docstr: Initializes the MiniBatchStandardDeviationBase instance.
  
  Args:
    *args: Arguments that get forwarded to the super initializer.
    batch_axis: Integer or a list of one integer, the axis the average
      standard deviation should be computed over (typically the batch axis).
      For instance, after a `Conv2D` layer, set `batch_axis=0` in
      `MiniBatchStandardDeviation`.
    channel_axis: Integer or a list of one integer, the axis the resulting
      standard deviation should be appended to (typically the channel axis).
      For instance, after a `Conv2D` layer with
      `data_format="channels_first"`, set `channel_axis=1` in
      `MiniBatchStandardDeviation`.
    **kwargs: Keyword argument dictionary that gets forwarded to the super
      initializer.
  Call arguments:
    inputs: Input tensor (of any rank).
  Input shape: Arbitrary. Use the keyword argument `input_shape` (tuple of
    integers, does not include the samples axis) when using this layer as the
    first layer in a model.
  Output shape: Same shape as input except in the dimension of the
    channel_axis, which will be incremented by 1.
  Reference:
    - [Tero Karras et al., 2018](https://arxiv.org/abs/1710.10196).
docstr_tok: ["Initializes","the","MiniBatchStandardDeviationBase","instance",".","Args",":","*","args",":","Arguments","that","get","forwarded","to","the","super","initializer",".","batch_axis",":","Integer","or","a","list","of","one","integer",",","the","axis","the","average","standard","deviation","should","be","computed","over","(","typically","the","batch","axis",")",".","For","instance",",","after","a","`","Conv2D","`","layer",",","set","`","batch_axis=0","`","in","`","MiniBatchStandardDeviation","`",".","channel_axis",":","Integer","or","a","list","of","one","integer",",","the","axis","the","resulting","standard","deviation","should","be","appended","to","(","typically","the","channel","axis",")",".","For","instance",",","after","a","`","Conv2D","`","layer","with","`","data_format=","''","channels_first","''","`",",","set","`","channel_axis=1","`","in","`","MiniBatchStandardDeviation","`",".","*","*","kwargs",":","Keyword","argument","dictionary","that","gets","forwarded","to","the","super","initializer",".","Call","arguments",":","inputs",":","Input","tensor","(","of","any","rank",")",".","Input","shape",":","Arbitrary",".","Use","the","keyword","argument","`","input_shape","`","(","tuple","of","integers",",","does","not","include","the","samples","axis",")","when","using","this","layer","as","the","first","layer","in","a","model",".","Output","shape",":","Same","shape","as","input","except","in","the","dimension","of","the","channel_axis",",","which","will","be","incremented","by","1",".","Reference",":","-","[","Tero","Karras","et","al.",",","2018","]","(","https",":","\/\/arxiv.org\/abs\/1710.10196",")","."]
code: def __init__(self, *args, batch_axis=0, channel_axis=-1, **kwargs):
      """Initializes the MiniBatchStandardDeviationBase instance.
  
      Args:
        *args: Arguments that get forwarded to the super initializer.
        batch_axis: Integer or a list of one integer, the axis the average
          standard deviation should be computed over (typically the batch axis).
          For instance, after a `Conv2D` layer, set `batch_axis=0` in
          `MiniBatchStandardDeviation`.
        channel_axis: Integer or a list of one integer, the axis the resulting
          standard deviation should be appended to (typically the channel axis).
          For instance, after a `Conv2D` layer with
          `data_format="channels_first"`, set `channel_axis=1` in
          `MiniBatchStandardDeviation`.
        **kwargs: Keyword argument dictionary that gets forwarded to the super
          initializer.
      Call arguments:
        inputs: Input tensor (of any rank).
      Input shape: Arbitrary. Use the keyword argument `input_shape` (tuple of
        integers, does not include the samples axis) when using this layer as the
        first layer in a model.
      Output shape: Same shape as input except in the dimension of the
        channel_axis, which will be incremented by 1.
      Reference:
        - [Tero Karras et al., 2018](https://arxiv.org/abs/1710.10196).
      """
      super().__init__(*args, **kwargs)
      if isinstance(batch_axis, (list, tuple)) and (
          len(batch_axis) == 1
      ):
          self.batch_axis = batch_axis[0]
      elif isinstance(batch_axis, int):
          self.batch_axis = batch_axis
      else:
          raise TypeError(
              "Expected an int or a list/tuple with one int for the "
              "argument 'batch_axis', but received: %r" % batch_axis
          )
  
      if isinstance(channel_axis, (list, tuple)) and (
          len(channel_axis) == 1
      ):
          self.channel_axis = channel_axis[0]
      elif isinstance(channel_axis, int):
          self.channel_axis = channel_axis
      else:
          raise TypeError(
              "Expected an int or a list/tuple with one int for the "
              "argument 'channel_axis', but received: %r" % channel_axis
          )
  
file_path: graphics/tensorflow_graphics/projects/gan/minibatch_standarddeviation.py
imports: import tensorflow
label_desc: Use image node_id 1 to create a new MiniBatchStandardDeviationBase object from inherited base classes: tf.keras.layers with example: obj = MiniBatchStandardDeviationBase()