code: def test_dpg(self):
      self.start_tests(name="DPG")
      actions = dict(
          gaussian_action1=dict(
              type="float", shape=(1, 2), min_value=1.0, max_value=2.0
          ),
          gaussian_action2=dict(
              type="float", shape=(1,), min_value=-2.0, max_value=1.0
          ),
      )
      agent, environment = self.prepare(
          actions=actions,
          agent="dpg",
          memory=100,
          batch_size=4,
          # TODO: no-RNN restriction can be removed
          network=dict(type="auto", size=8, depth=1, rnn=False),
          # TODO: cannot use RNN since value function takes states and actions
          critic=dict(type="auto", size=7, depth=1, rnn=False),
      )
  
      self.execute(agent=agent, environment=environment)
  
      with TemporaryDirectory() as directory:
          agent.save(directory=directory, format="numpy")
          agent = Agent.load(directory=directory)
          states = environment.reset()
          agent.act(states=states)
          agent.close()
          environment.close()
  
file_path: tensorforce/test/test_agents.py
imports: from tempfile import TemporaryDirectory
  import unittest
  from tensorforce import Agent
  from test.unittest_base import UnittestBase
label_desc: Use image node_id 4 for calling the TestAgents obj's underlying member method code with example usage: obj.test_dpg() without return types