class_docstr: Test MLPModule.
class_docstr_tok: ["Test","MLPModule","."]
docstr: Check MLPModule is pickeable.
  
  Args:
      input_dim (int): Input dimension.
      output_dim (int): Ouput dimension.
      hidden_sizes (list[int]): Size of hidden layers.
docstr_tok: ["Check","MLPModule","is","pickeable",".","Args",":","input_dim","(","int",")",":","Input","dimension",".","output_dim","(","int",")",":","Ouput","dimension",".","hidden_sizes","(","list","[","int","]",")",":","Size","of","hidden","layers","."]
code: def test_is_pickleable(self, input_dim, output_dim, hidden_sizes):
      """Check MLPModule is pickeable.
  
      Args:
          input_dim (int): Input dimension.
          output_dim (int): Ouput dimension.
          hidden_sizes (list[int]): Size of hidden layers.
  
      """
      input_val = torch.ones([1, input_dim], dtype=torch.float32)
      module = MLPModule(
          input_dim=input_dim,
          output_dim=output_dim,
          hidden_nonlinearity=torch.relu,
          hidden_sizes=hidden_sizes,
          hidden_w_init=nn.init.ones_,
          output_w_init=nn.init.ones_,
          output_nonlinearity=torch.nn.ReLU,
      )
  
      output1 = module(input_val)
  
      h = pickle.dumps(module)
      model_pickled = pickle.loads(h)
      output2 = model_pickled(input_val)
  
      assert np.array_equal(torch.all(torch.eq(output1, output2)), True)
  
file_path: garage/tests/garage/torch/modules/test_mlp_module.py
imports: import pickle
  import numpy
  import pytest
  import torch
  import torch.nn
  from garage.torch.modules import MLPModule
label_desc: Use image node_id 2 for calling the TestMLPModel obj's underlying member method code with example usage: obj.test_is_pickleable(input_dim, output_dim, hidden_sizes) without return types