class_docstr: A wrapper that applies exponential moving averaging to action outputs.
docstr: Adds TemporalActionSmoothing to the given policy.
  
  smoothed_action = previous_action * smoothing_coefficient +
                    action * (1.0 - smoothing_coefficient))
  
  Args:
    policy: A policy implementing the tf_policy.TFPolicy interface.
    smoothing_coefficient: Coefficient used for smoothing actions.
    name: The name of this policy. Defaults to the class name.
docstr_tok: ["Adds","TemporalActionSmoothing","to","the","given","policy",".","smoothed_action","=","previous_action","*","smoothing_coefficient","+","action","*","(","1.0","-","smoothing_coefficient",")",")","Args",":","policy",":","A","policy","implementing","the","tf_policy.TFPolicy","interface",".","smoothing_coefficient",":","Coefficient","used","for","smoothing","actions",".","name",":","The","name","of","this","policy",".","Defaults","to","the","class","name","."]
code: def __init__(
      self,
      policy: tf_policy.TFPolicy,
      smoothing_coefficient: float,
      name: Optional[Text] = None,
  ):
      """Adds TemporalActionSmoothing to the given policy.
  
      smoothed_action = previous_action * smoothing_coefficient +
                        action * (1.0 - smoothing_coefficient))
  
      Args:
        policy: A policy implementing the tf_policy.TFPolicy interface.
        smoothing_coefficient: Coefficient used for smoothing actions.
        name: The name of this policy. Defaults to the class name.
      """
      policy_state_spec = (policy.policy_state_spec, policy.action_spec)
      super(TemporalActionSmoothing, self).__init__(
          policy.time_step_spec,
          policy.action_spec,
          policy_state_spec,
          name=name,
      )
      self._wrapped_policy = policy
      self._smoothing_coefficient = smoothing_coefficient
  
file_path: agents/tf_agents/policies/temporal_action_smoothing.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import tensorflow
  from tf_agents.policies import tf_policy
  from tf_agents.trajectories import policy_step
label_desc: Use image node_id 1 to create a new TemporalActionSmoothing object from inherited base classes: tf_policy with example: obj = TemporalActionSmoothing(policy, smoothing_coefficient, name)