def __init__(self,<EOL>shift=None,<EOL>scale_identity_multiplier=None,<EOL>scale_diag=None,<EOL>scale_tril=None,<EOL>scale_perturb_factor=None,<EOL>scale_perturb_diag=None,<EOL>adjoint=False,<EOL>validate_args=False,<EOL>name="<STR_LIT>",<EOL>dtype=None):
self._graph_parents = []<EOL>self._name = name<EOL>self._validate_args = validate_args<EOL>if scale_perturb_diag is not None and scale_perturb_factor is None:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>self._is_only_identity_multiplier = (scale_tril is None and<EOL>scale_diag is None and<EOL>scale_perturb_factor is None)<EOL>with self._name_scope("<STR_LIT>"):<EOL><INDENT>if dtype is None:<EOL><INDENT>dtype = dtype_util.common_dtype([<EOL>shift, scale_identity_multiplier, scale_diag, scale_tril,<EOL>scale_perturb_diag, scale_perturb_factor<EOL>], tf.float32)<EOL><DEDENT>if shift is not None:<EOL><INDENT>shift = tf.convert_to_tensor(value=shift, name="<STR_LIT>", dtype=dtype)<EOL><DEDENT>self._shift = shift<EOL>if (self._is_only_identity_multiplier and<EOL>scale_identity_multiplier is None):<EOL><INDENT>scale_identity_multiplier = tf.convert_to_tensor(value=<NUM_LIT:1.>, dtype=dtype)<EOL><DEDENT>scale = self._create_scale_operator(<EOL>identity_multiplier=scale_identity_multiplier,<EOL>diag=scale_diag,<EOL>tril=scale_tril,<EOL>perturb_diag=scale_perturb_diag,<EOL>perturb_factor=scale_perturb_factor,<EOL>shift=shift,<EOL>validate_args=validate_args,<EOL>dtype=dtype)<EOL>if scale is not None and not self._is_only_identity_multiplier:<EOL><INDENT>if (shift is not None and<EOL>not dtype_util.base_equal(shift.dtype, scale.dtype)):<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>".format(<EOL>shift.dtype, scale.dtype))<EOL><DEDENT><DEDENT>self._scale = scale<EOL>self._adjoint = adjoint<EOL>super(Affine, self).__init__(<EOL>forward_min_event_ndims=<NUM_LIT:1>,<EOL>graph_parents=([self._scale] if tf.is_tensor(<EOL>self._scale) else self._scale.graph_parents +<EOL>[self._shift] if self._shift is not None else []),<EOL>is_constant_jacobian=True,<EOL>dtype=dtype,<EOL>validate_args=validate_args,<EOL>name=name)<EOL><DEDENT>
Instantiates the `Affine` bijector.

        This `Bijector` is initialized with `shift` `Tensor` and `scale` arguments,
        giving the forward operation:

        ```none
        Y = g(X) = scale @ X + shift
        ```

        where the `scale` term is logically equivalent to:

        ```python
        scale = (
          scale_identity_multiplier * tf.diag(tf.ones(d)) +
          tf.diag(scale_diag) +
          scale_tril +
          scale_perturb_factor @ diag(scale_perturb_diag) @
            tf.transpose([scale_perturb_factor])
        )
        ```

        If none of `scale_identity_multiplier`, `scale_diag`, or `scale_tril` are
        specified then `scale += IdentityMatrix`. Otherwise specifying a
        `scale` argument has the semantics of `scale += Expand(arg)`, i.e.,
        `scale_diag != None` means `scale += tf.diag(scale_diag)`.

        Args:
          shift: Floating-point `Tensor`. If this is set to `None`, no shift is
            applied.
          scale_identity_multiplier: floating point rank 0 `Tensor` representing a
            scaling done to the identity matrix.
            When `scale_identity_multiplier = scale_diag = scale_tril = None` then
            `scale += IdentityMatrix`. Otherwise no scaled-identity-matrix is added
            to `scale`.
          scale_diag: Floating-point `Tensor` representing the diagonal matrix.
            `scale_diag` has shape `[N1, N2, ...  k]`, which represents a k x k
            diagonal matrix.
            When `None` no diagonal term is added to `scale`.
          scale_tril: Floating-point `Tensor` representing the lower triangular
            matrix. `scale_tril` has shape `[N1, N2, ...  k, k]`, which represents a
            k x k lower triangular matrix.
            When `None` no `scale_tril` term is added to `scale`.
            The upper triangular elements above the diagonal are ignored.
          scale_perturb_factor: Floating-point `Tensor` representing factor matrix
            with last two dimensions of shape `(k, r)`. When `None`, no rank-r
            update is added to `scale`.
          scale_perturb_diag: Floating-point `Tensor` representing the diagonal
            matrix. `scale_perturb_diag` has shape `[N1, N2, ...  r]`, which
            represents an `r x r` diagonal matrix. When `None` low rank updates will
            take the form `scale_perturb_factor * scale_perturb_factor.T`.
          adjoint: Python `bool` indicating whether to use the `scale` matrix as
            specified or its adjoint.
            Default value: `False`.
          validate_args: Python `bool` indicating whether arguments should be
            checked for correctness.
          name: Python `str` name given to ops managed by this object.
          dtype: `tf.DType` to prefer when converting args to `Tensor`s. Else, we
            fall back to a common dtype inferred from the args, finally falling back
            to float32.

        Raises:
          ValueError: if `perturb_diag` is specified but not `perturb_factor`.
          TypeError: if `shift` has different `dtype` from `scale` arguments.