class_docstr: Tests for policy loader.
class_docstr_tok: ["Tests","for","policy","loader","."]
code: def setUp(self):
      super(PolicyLoaderTest, self).setUp()
      self.root_dir = self.get_temp_dir()
      tf_observation_spec = tensor_spec.TensorSpec((), np.float32)
      tf_time_step_spec = ts.time_step_spec(tf_observation_spec)
      tf_action_spec = tensor_spec.BoundedTensorSpec(
          (), np.float32, 0, 3
      )
      self.net = AddNet()
      self.policy = greedy_policy.GreedyPolicy(
          q_policy.QPolicy(tf_time_step_spec, tf_action_spec, self.net)
      )
      self.train_step = common.create_variable(
          "train_step", initial_value=0
      )
      self.saver = policy_saver.PolicySaver(
          self.policy, train_step=self.train_step
      )
  
imports: import os
  import numpy
  import tensorflow.compat.v2
  from tf_agents.networks import network
  from tf_agents.policies import greedy_policy
  from tf_agents.policies import policy_loader
  from tf_agents.policies import policy_saver
  from tf_agents.policies import q_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
  from tf_agents.utils import test_utils
label_desc: Use image node_id 1 for calling the PolicyLoaderTest obj's underlying member method code with example usage: obj.setUp() without return types