class_docstr: Compute `Y = g(X; scale) = scale @ X`.
  
  `scale` is a `LinearOperator` and the forward transformation is: `scale @ X`
  where `@` denotes matrix-vector multiplication.
  
  If `X` is a scalar (represented as a vector of length `1`) then the forward
  transformation is: `scale * X` where `*` denotes broadcasted elementwise
  product.
  
  Example Use:
  
  ```python
  x = [1., 2, 3]
  
  diag = [1., 2, 3]
  scale = tf.linalg.LinearOperatorDiag(diag)
  bijector = ScaleMatvecLinearOperator(scale)
  # In this case, `forward` is equivalent to:
  # y = scale @ x
  y = bijector.forward(x)  # Tensor([1., 4, 9])
  
  tril = [[1., 0, 0],
          [2, 1, 0],
          [3, 2, 1]]
  scale = tf.linalg.LinearOperatorLowerTriangular(tril)
  bijector = ScaleMatvecLinearOperator(scale)
  # In this case, `forward` is equivalent to:
  # np.squeeze(np.matmul(tril, np.expand_dims(x, -1)), -1)
  y = bijector.forward(x)  # Tensor([1., 4, 10])
  ```
class_docstr_tok: ["Compute","`","Y","=","g","(","X",";","scale",")","=","scale","@","X","`",".","`","scale","`","is","a","`","LinearOperator","`","and","the","forward","transformation","is",":","`","scale","@","X","`","where","`","@","`","denotes","matrix-vector","multiplication",".","If","`","X","`","is","a","scalar","(","represented","as","a","vector","of","length","`","1","`",")","then","the","forward","transformation","is",":","`","scale","*","X","`","where","`","*","`","denotes","broadcasted","elementwise","product",".","Example","Use",":","``","`","python","x","=","[","1.",",","2",",","3","]","diag","=","[","1.",",","2",",","3","]","scale","=","tf.linalg.LinearOperatorDiag","(","diag",")","bijector","=","ScaleMatvecLinearOperator","(","scale",")","#","In","this","case",",","`","forward","`","is","equivalent","to",":","#","y","=","scale","@","x","y","=","bijector.forward","(","x",")","#","Tensor","(","[","1.",",","4",",","9","]",")","tril","=","[","[","1.",",","0",",","0","]",",","[","2",",","1",",","0","]",",","[","3",",","2",",","1","]","]","scale","=","tf.linalg.LinearOperatorLowerTriangular","(","tril",")","bijector","=","ScaleMatvecLinearOperator","(","scale",")","#","In","this","case",",","`","forward","`","is","equivalent","to",":","#","np.squeeze","(","np.matmul","(","tril",",","np.expand_dims","(","x",",","-1",")",")",",","-1",")","y","=","bijector.forward","(","x",")","#","Tensor","(","[","1.",",","4",",","10","]",")","``","`"]
docstr: Instantiates the `ScaleMatvecLinearOperator` bijector.
  
  Args:
    scale:  Subclass of `LinearOperator`. Represents the (batch, non-singular)
      linear transformation by which the `Bijector` transforms inputs.
    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.
    parameters: Locals dict captured by subclass constructor, to be used for
      copy/slice re-instantiation operators.
    name: Python `str` name given to ops managed by this object.
  
  Raises:
    TypeError: if `scale` is not a `LinearOperator`.
    ValueError: if not `scale.is_non_singular`.
docstr_tok: ["Instantiates","the","`","ScaleMatvecLinearOperator","`","bijector",".","Args",":","scale",":","Subclass","of","`","LinearOperator","`",".","Represents","the","(","batch",",","non-singular",")","linear","transformation","by","which","the","`","Bijector","`","transforms","inputs",".","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",".","parameters",":","Locals","dict","captured","by","subclass","constructor",",","to","be","used","for","copy\/slice","re-instantiation","operators",".","name",":","Python","`","str","`","name","given","to","ops","managed","by","this","object",".","Raises",":","TypeError",":","if","`","scale","`","is","not","a","`","LinearOperator","`",".","ValueError",":","if","not","`","scale.is_non_singular","`","."]
code: def __init__(
      self,
      scale,
      adjoint=False,
      validate_args=False,
      parameters=None,
      name="scale_matvec_linear_operator",
  ):
      """Instantiates the `ScaleMatvecLinearOperator` bijector.
  
      Args:
        scale:  Subclass of `LinearOperator`. Represents the (batch, non-singular)
          linear transformation by which the `Bijector` transforms inputs.
        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.
        parameters: Locals dict captured by subclass constructor, to be used for
          copy/slice re-instantiation operators.
        name: Python `str` name given to ops managed by this object.
  
      Raises:
        TypeError: if `scale` is not a `LinearOperator`.
        ValueError: if not `scale.is_non_singular`.
      """
      parameters = dict(locals()) if parameters is None else parameters
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype(
              [scale], dtype_hint=tf.float32
          )
          if not hasattr(scale, "is_non_singular"):
              raise TypeError(
                  "scale does not implement the interface of tf.LinearOperator "
                  "(saw: {}).".format(scale)
              )
          if validate_args and not scale.is_non_singular:
              raise ValueError("Scale matrix must be non-singular.")
          self._scale = scale
          self._adjoint = adjoint
          super(ScaleMatvecLinearOperator, self).__init__(
              forward_min_event_ndims=1,
              is_constant_jacobian=True,
              dtype=dtype,
              validate_args=validate_args,
              parameters=parameters,
              name=name,
          )
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  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
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 to create a new ScaleMatvecLinearOperator object from inherited base classes: _ScaleMatvecLinearOperatorBase with example: obj = ScaleMatvecLinearOperator(scale, adjoint, validate_args, parameters, name)