class_docstr: Test class for VPG.
class_docstr_tok: ["Test","class","for","VPG","."]
docstr: Setup method which is called before every test.
docstr_tok: ["Setup","method","which","is","called","before","every","test","."]
code: def setup_method(self):
      """Setup method which is called before every test."""
      self._env = GymEnv(
          "InvertedDoublePendulum-v2", max_episode_length=100
      )
      self._trainer = Trainer(snapshot_config)
  
      self._policy = GaussianMLPPolicy(
          env_spec=self._env.spec,
          hidden_sizes=[64, 64],
          hidden_nonlinearity=torch.tanh,
          output_nonlinearity=None,
      )
      self._sampler = LocalSampler(
          agents=self._policy,
          envs=self._env,
          max_episode_length=self._env.spec.max_episode_length,
      )
      self._params = {
          "env_spec": self._env.spec,
          "policy": self._policy,
          "value_function": GaussianMLPValueFunction(
              env_spec=self._env.spec
          ),
          "sampler": self._sampler,
          "discount": 0.99,
      }
  
file_path: garage/tests/garage/torch/algos/test_vpg.py
imports: import pytest
  import torch
  from garage.envs import GymEnv
  from garage.experiment import deterministic
  from garage.sampler import LocalSampler
  from garage.torch.algos import VPG
  from garage.torch.policies import GaussianMLPPolicy
  from garage.torch.value_functions import GaussianMLPValueFunction
  from garage.trainer import Trainer
  from tests.fixtures import snapshot_config
label_desc: Use image node_id 2 for calling the TestVPG obj's underlying member method code with example usage: obj.setup_method() without return types