class_docstr: Exposes a numpy API for TF policies in Eager mode.
class_docstr_tok: ["Exposes","a","numpy","API","for","TF","policies","in","Eager","mode","."]
code: def __init__(
      self,
      policy: tf_policy.TFPolicy,
      use_tf_function: bool = False,
      batch_time_steps=True,
  ):
      time_step_spec = tensor_spec.to_nest_array_spec(
          policy.time_step_spec
      )
      action_spec = tensor_spec.to_nest_array_spec(policy.action_spec)
      policy_state_spec = tensor_spec.to_nest_array_spec(
          policy.policy_state_spec
      )
      info_spec = tensor_spec.to_nest_array_spec(policy.info_spec)
      super(PyTFEagerPolicy, self).__init__(
          policy,
          time_step_spec,
          action_spec,
          policy_state_spec,
          info_spec,
          use_tf_function,
          batch_time_steps,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from typing import Optional, Text
  from absl import logging
  import gin
  import tensorflow
  from tf_agents.policies import policy_saver
  from tf_agents.policies import py_policy
  from tf_agents.policies import tf_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import common
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 to create a new PyTFEagerPolicy object from inherited base classes: PyTFEagerPolicyBase with example: obj = PyTFEagerPolicy(policy, use_tf_function, batch_time_steps)