class_docstr: Test class for ContinuousMLPPolicy
class_docstr_tok: ["Test","class","for","ContinuousMLPPolicy"]
docstr: Test get_action method
docstr_tok: ["Test","get_action","method"]
code: def test_get_action(self, obs_dim, action_dim, obs_type):
      """Test get_action method"""
      assert obs_type in ["box", "dict"]
      if obs_type == "box":
          env = GymEnv(
              DummyBoxEnv(obs_dim=obs_dim, action_dim=action_dim)
          )
      else:
          env = GymEnv(
              DummyDictEnv(obs_space_type="box", act_space_type="box")
          )
  
      policy = ContinuousMLPPolicy(env_spec=env.spec)
  
      env.reset()
      obs = env.step(1).observation
      if obs_type == "box":
          obs = obs.flatten()
  
      action, _ = policy.get_action(obs)
  
      assert env.action_space.contains(action)
  
      actions, _ = policy.get_actions([obs, obs, obs])
      for action in actions:
          assert env.action_space.contains(action)
  
file_path: garage/tests/garage/tf/policies/test_continuous_mlp_policy.py
imports: import pickle
  from unittest import mock
  import numpy
  import pytest
  import tensorflow
  from garage.envs import GymEnv
  from garage.tf.policies import ContinuousMLPPolicy
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyBoxEnv, DummyDictEnv
label_desc: Use image node_id 1 for calling the TestContinuousMLPPolicy obj's underlying member method code with example usage: obj.test_get_action(obs_dim, action_dim, obs_type) without return types