class_docstr: Sonnet module rescaling inputs in [-1, 1] to match a BoundedArraySpec.
class_docstr_tok: ["Sonnet","module","rescaling","inputs","in","[","-1",",","1","]","to","match","a","BoundedArraySpec","."]
code: def __init__(
      self, spec: specs.BoundedArray, name: str = "rescale_to_spec"
  ):
      super().__init__(name=name)
      self._scale = spec.maximum - spec.minimum
      self._offset = spec.minimum
  
file_path: acme/acme/tf/networks/rescaling.py
imports: from typing import Union
  from acme import specs
  import sonnet
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 1 to create a new RescaleToSpec object from inherited base classes: snt with example: obj = RescaleToSpec(spec, name)