class_docstr: Returns greedy samples of a given policy.
class_docstr_tok: ["Returns","greedy","samples","of","a","given","policy","."]
docstr: Builds a greedy TFPolicy wrapping the given policy.
  
  Args:
    policy: A policy implementing the tf_policy.TFPolicy interface.
    name: The name of this policy. All variables in this module will fall
      under that name. Defaults to the class name.
docstr_tok: ["Builds","a","greedy","TFPolicy","wrapping","the","given","policy",".","Args",":","policy",":","A","policy","implementing","the","tf_policy.TFPolicy","interface",".","name",":","The","name","of","this","policy",".","All","variables","in","this","module","will","fall","under","that","name",".","Defaults","to","the","class","name","."]
code: def __init__(
      self, policy: tf_policy.TFPolicy, name: Optional[Text] = None
  ):
      """Builds a greedy TFPolicy wrapping the given policy.
  
      Args:
        policy: A policy implementing the tf_policy.TFPolicy interface.
        name: The name of this policy. All variables in this module will fall
          under that name. Defaults to the class name.
      """
      super(GreedyPolicy, self).__init__(
          policy.time_step_spec,
          policy.action_spec,
          policy.policy_state_spec,
          policy.info_spec,
          emit_log_probability=policy.emit_log_probability,
          name=name,
      )
      self._wrapped_policy = policy
  
file_path: agents/tf_agents/policies/greedy_policy.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import gin
  import tensorflow
  import tensorflow_probability
  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 GreedyPolicy object from inherited base classes: tf_policy with example: obj = GreedyPolicy(policy, name)