class_docstr: Compute `Y = g(X; scale) = scale @ X`.
  
  In TF parlance, the `scale` term is logically equivalent to:
  
  ```python
  scale = tf.diag(scale_diag)
  ```
  
  The `scale` term is applied without materializing a full dense matrix.
  
  #### Examples
  
  ```python
  # Y = tf.diag(d1) @ X
  b = ScaleMatvecDiag(scale_diag=[-1., 2, 1])  # Implicitly 3x3.
  ```
docstr: Instantiates the `ScaleMatvecDiag` bijector.
  
  This `Bijector`'s forward operation is:
  
  ```none
  Y = g(X) = scale @ X
  ```
  
  where the `scale` term is logically equivalent to:
  
  ```python
  scale = tf.diag(scale_diag)
  ```
  
  Args:
    scale_diag: Floating-point `Tensor` representing the diagonal matrix.
      `scale_diag` has shape `[N1, N2, ...  k]`, which represents a k x k
      diagonal matrix.
    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 `scale_diag` is not specified.
code: def __init__(
      self,
      scale_diag,
      adjoint=False,
      validate_args=False,
      name="scale_matvec_diag",
      dtype=None,
  ):
      """Instantiates the `ScaleMatvecDiag` bijector.
  
      This `Bijector`'s forward operation is:
  
      ```none
      Y = g(X) = scale @ X
      ```
  
      where the `scale` term is logically equivalent to:
  
      ```python
      scale = tf.diag(scale_diag)
      ```
  
      Args:
        scale_diag: Floating-point `Tensor` representing the diagonal matrix.
          `scale_diag` has shape `[N1, N2, ...  k]`, which represents a k x k
          diagonal matrix.
        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 `scale_diag` is not specified.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          if dtype is None:
              dtype = dtype_util.common_dtype([scale_diag, scale_diag])
  
          scale_diag = tensor_util.convert_nonref_to_tensor(
              scale_diag, name="scale_diag", dtype=dtype
          )
  
          super(ScaleMatvecDiag, self).__init__(
              scale=tf.linalg.LinearOperatorDiag(
                  diag=scale_diag, is_non_singular=True
              ),
              adjoint=adjoint,
              validate_args=validate_args,
              parameters=parameters,
              name=name,
          )
  
file_path: probability/tensorflow_probability/python/bijectors/scale_matvec_diag.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import ldj_ratio
  from tensorflow_probability.python.bijectors import scale_matvec_linear_operator
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 to create a new ScaleMatvecDiag object from inherited base classes: scale_matvec_linear_operator with example: obj = ScaleMatvecDiag(scale_diag, adjoint, validate_args, name, dtype)