code: def test_auxiliary(self):
      input_space = akro.Box(np.array([-1, -1]), np.array([1, 1]))
      latent_space = akro.Box(
          np.array([-2, -2, -2]), np.array([2, 2, 2])
      )
      embedding_spec = InOutSpec(
          input_space=input_space, output_space=latent_space
      )
      embedding = GaussianMLPEncoder(
          embedding_spec, hidden_sizes=[32, 32, 32]
      )
      # 9 Layers: (3 hidden + 1 output) * (1 weight + 1 bias) + 1 log_std
      assert len(embedding.get_params()) == 9
      assert len(embedding.get_global_vars()) == 9
  
      assert (
          embedding.distribution.loc.get_shape().as_list()[-1]
          == latent_space.shape[0]
      )
      assert embedding.input.shape.as_list() == [
          None,
          None,
          input_space.shape[0],
      ]
      assert embedding.latent_mean.shape.as_list() == [
          None,
          None,
          latent_space.shape[0],
      ]
      assert embedding.latent_std_param.shape.as_list() == [
          None,
          1,
          latent_space.shape[0],
      ]
  
      # To increase coverage in embeddings/base.py
      embedding.reset()
      assert embedding.input_dim == embedding_spec.input_space.flat_dim
      assert (
          embedding.output_dim == embedding_spec.output_space.flat_dim
      )
  
      var_shapes = [
          (2, 32),
          (32,),  # input
          (32, 32),
          (32,),  # hidden 0
          (32, 32),
          (32,),  # hidden 1
          (32, 3),
          (3,),  # hidden 2
          (3,),
      ]  # log_std
      assert sorted(embedding.get_param_shapes()) == sorted(var_shapes)
  
      var_count = sum(list(map(np.prod, var_shapes)))
      embedding.set_param_values(np.ones(var_count))
      assert (embedding.get_param_values() == np.ones(var_count)).all()
  
      assert sorted(
          map(np.shape, embedding.flat_to_params(np.ones(var_count)))
      ) == sorted(var_shapes)
  
file_path: garage/tests/garage/tf/embeddings/test_gaussian_mlp_encoder.py
imports: import pickle
  from unittest import mock
  import akro
  import numpy
  import pytest
  import tensorflow
  from garage import InOutSpec
  from garage.envs import GymEnv
  from garage.tf.embeddings import GaussianMLPEncoder
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyBoxEnv
label_desc: Use image node_id 4 for calling the TestGaussianMLPEncoder obj's underlying member method code with example usage: obj.test_auxiliary() without return types