class_docstr: Compute `Y = g(X; scale) = scale * X`.
  
  Examples:
  
  ```python
  # Y = 2 * X
  b = Scale(scale=2.)
  ```
class_docstr_tok: ["Compute","`","Y","=","g","(","X",";","scale",")","=","scale","*","X","`",".","Examples",":","``","`","python","#","Y","=","2","*","X","b","=","Scale","(","scale=2",".",")","``","`"]
docstr: Instantiates the `Scale` bijector.
  
  This `Bijector`'s forward operation is:
  
  ```none
  Y = g(X) = scale * X
  ```
  
  Alternatively, you can specify `log_scale` instead of `scale` for slighly
  better numerics with tiny scales. Note that when using `log_scale` it is
  currently impossible to specify a negative scale.
  
  Args:
    scale: Floating-point `Tensor`.
    log_scale: Floating-point `Tensor`. Logarithm of the scale. If this is set
      to `None`, no scale is applied. This should not be set if `scale` is
      set.
    validate_args: Python `bool` indicating whether arguments should be
      checked for correctness.
    name: Python `str` name given to ops managed by this object.
  
  Raises:
    ValueError: If both `scale` and `log_scale` are specified.
docstr_tok: ["Instantiates","the","`","Scale","`","bijector",".","This","`","Bijector","`","'s","forward","operation","is",":","``","`","none","Y","=","g","(","X",")","=","scale","*","X","``","`","Alternatively",",","you","can","specify","`","log_scale","`","instead","of","`","scale","`","for","slighly","better","numerics","with","tiny","scales",".","Note","that","when","using","`","log_scale","`","it","is","currently","impossible","to","specify","a","negative","scale",".","Args",":","scale",":","Floating-point","`","Tensor","`",".","log_scale",":","Floating-point","`","Tensor","`",".","Logarithm","of","the","scale",".","If","this","is","set","to","`","None","`",",","no","scale","is","applied",".","This","should","not","be","set","if","`","scale","`","is","set",".","validate_args",":","Python","`","bool","`","indicating","whether","arguments","should","be","checked","for","correctness",".","name",":","Python","`","str","`","name","given","to","ops","managed","by","this","object",".","Raises",":","ValueError",":","If","both","`","scale","`","and","`","log_scale","`","are","specified","."]
code: def __init__(
      self,
      scale=None,
      log_scale=None,
      validate_args=False,
      name="scale",
  ):
      """Instantiates the `Scale` bijector.
  
      This `Bijector`'s forward operation is:
  
      ```none
      Y = g(X) = scale * X
      ```
  
      Alternatively, you can specify `log_scale` instead of `scale` for slighly
      better numerics with tiny scales. Note that when using `log_scale` it is
      currently impossible to specify a negative scale.
  
      Args:
        scale: Floating-point `Tensor`.
        log_scale: Floating-point `Tensor`. Logarithm of the scale. If this is set
          to `None`, no scale is applied. This should not be set if `scale` is
          set.
        validate_args: Python `bool` indicating whether arguments should be
          checked for correctness.
        name: Python `str` name given to ops managed by this object.
  
      Raises:
        ValueError: If both `scale` and `log_scale` are specified.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          dtype = dtype_util.common_dtype(
              [scale, log_scale], dtype_hint=tf.float32
          )
  
          if scale is not None and log_scale is not None:
              raise ValueError(
                  "At most one of `scale` and `log_scale` should be "
                  "specified"
              )
  
          self._scale = tensor_util.convert_nonref_to_tensor(
              scale, dtype=dtype, name="scale"
          )
          self._log_scale = tensor_util.convert_nonref_to_tensor(
              log_scale, dtype=dtype, name="log_scale"
          )
  
          super(Scale, self).__init__(
              forward_min_event_ndims=0,
              is_constant_jacobian=True,
              validate_args=validate_args,
              dtype=dtype,
              parameters=parameters,
              name=name,
          )
  
file_path: probability/tensorflow_probability/python/bijectors/scale.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 to create a new Scale object from inherited base classes: bijector, bijector with example: obj = Scale(scale, log_scale, validate_args, name)