class_docstr: Bijector to implement Activation Normalization (ActNorm).
class_docstr_tok: ["Bijector","to","implement","Activation","Normalization","(","ActNorm",")","."]
code: def __init__(
      self, nchan, dtype=tf.float32, validate_args=False, name=None
  ):
      parameters = dict(locals())
  
      self._initialized = tf.Variable(False, trainable=False)
      self._m = tf.Variable(tf.zeros(nchan, dtype))
      self._s = TransformedVariable(tf.ones(nchan, dtype), exp.Exp())
      self._bijector = invert.Invert(
          chain.Chain(
              [
                  scale.Scale(self._s),
                  shift.Shift(self._m),
              ]
          )
      )
      super(ActivationNormalization, self).__init__(
          validate_args=validate_args,
          forward_min_event_ndims=1,
          parameters=parameters,
          name=name or "ActivationNormalization",
      )
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors import blockwise
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import composition
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import real_nvp
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_lu
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import transpose
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.util.deferred_tensor import TransformedVariable
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 1 to create a new ActivationNormalization object from inherited base classes: bijector with example: obj = ActivationNormalization(nchan, dtype, validate_args, name)