class_docstr: Actor Policy with Ornstein Uhlenbeck (OU) exploration noise.
class_docstr_tok: ["Actor","Policy","with","Ornstein","Uhlenbeck","(","OU",")","exploration","noise","."]
code: def _action(
      self, time_step, policy_state, seed
  ):  # pytype: disable=signature-mismatch  # overriding-parameter-count-checks
      seed_stream = tfp.util.SeedStream(seed=seed, salt="ou_noise")
  
      def _create_ou_process(action_spec):
          return common.OUProcess(
              lambda: tf.zeros(
                  action_spec.shape, dtype=action_spec.dtype
              ),
              self._ou_damping,
              self._ou_stddev,
              seed=seed_stream(),
          )
  
      if self._ou_process is None:
          self._ou_process = tf.nest.map_structure(
              _create_ou_process, self._action_spec
          )
  
      action_step = self._wrapped_policy.action(
          time_step, policy_state, seed_stream()
      )
  
      def _add_ou_noise(action, ou_process):
          return action + ou_process()
  
      actions = tf.nest.map_structure(
          _add_ou_noise, action_step.action, self._ou_process
      )
      return policy_step.PolicyStep(
          actions, action_step.state, action_step.info
      )
  
file_path: agents/tf_agents/policies/ou_noise_policy.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import tensorflow
  import tensorflow_probability
  from tf_agents.policies import tf_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.typing import types
  from tf_agents.utils import common
label_desc: Use image node_id 3 for calling the OUNoisePolicy obj's underlying member method code with example usage: obj._action(time_step, policy_state, seed) and returns: policy_step, common, unknown