class_docstr: Test MLPModule.
class_docstr_tok: ["Test","MLPModule","."]
docstr: Check MLPModule throws exception with invalid non-linear functions.
  
  Args:
      hidden_nonlinear (callable or torch.nn.Module): Non-linear
          functions for hidden layers.
      output_nonlinear (callable or torch.nn.Module): Non-linear
          functions for output layer.
docstr_tok: ["Check","MLPModule","throws","exception","with","invalid","non-linear","functions",".","Args",":","hidden_nonlinear","(","callable","or","torch.nn.Module",")",":","Non-linear","functions","for","hidden","layers",".","output_nonlinear","(","callable","or","torch.nn.Module",")",":","Non-linear","functions","for","output","layer","."]
code: def test_no_head_invalid_settings(
      self, hidden_nonlinear, output_nonlinear
  ):
      """Check MLPModule throws exception with invalid non-linear functions.
  
      Args:
          hidden_nonlinear (callable or torch.nn.Module): Non-linear
              functions for hidden layers.
          output_nonlinear (callable or torch.nn.Module): Non-linear
              functions for output layer.
  
      """
      expected_msg = "Non linear function .* is not supported"
      with pytest.raises(ValueError, match=expected_msg):
          MLPModule(
              input_dim=3,
              output_dim=5,
              hidden_sizes=(2, 3),
              hidden_nonlinearity=hidden_nonlinear,
              output_nonlinearity=output_nonlinear,
          )
  
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 3 for calling the TestMLPModel obj's underlying member method code with example usage: obj.test_no_head_invalid_settings(hidden_nonlinear, output_nonlinear) without return types