class_docstr: This MLP network encodes context of RL tasks.
  
  Context is stored in the terms of observation, action, and reward, and this
  network uses an MLP module for encoding it.
  
  Args:
      input_dim (int) : Dimension of the network input.
      output_dim (int): Dimension of the network output.
      hidden_sizes (list[int]): Output dimension of dense layer(s).
          For example, (32, 32) means this MLP consists of two
          hidden layers, each with 32 hidden units.
      hidden_nonlinearity (callable or torch.nn.Module): Activation
          function for intermediate dense layer(s). It should return a
          torch.Tensor.Set it to None to maintain a linear activation.
      hidden_w_init (callable): Initializer function for the weight
          of intermediate dense layer(s). The function should return a
          torch.Tensor.
      hidden_b_init (callable): Initializer function for the bias
          of intermediate dense layer(s). The function should return a
          torch.Tensor.
      output_nonlinearity (callable or torch.nn.Module): Activation
          function for output dense layer. It should return a
          torch.Tensor. Set it to None to maintain a linear activation.
      output_w_init (callable): Initializer function for the weight
          of output dense layer(s). The function should return a
          torch.Tensor.
      output_b_init (callable): Initializer function for the bias
          of output dense layer(s). The function should return a
          torch.Tensor.
      layer_normalization (bool): Bool for using layer normalization or not.
class_docstr_tok: ["This","MLP","network","encodes","context","of","RL","tasks",".","Context","is","stored","in","the","terms","of","observation",",","action",",","and","reward",",","and","this","network","uses","an","MLP","module","for","encoding","it",".","Args",":","input_dim","(","int",")",":","Dimension","of","the","network","input",".","output_dim","(","int",")",":","Dimension","of","the","network","output",".","hidden_sizes","(","list","[","int","]",")",":","Output","dimension","of","dense","layer","(","s",")",".","For","example",",","(","32",",","32",")","means","this","MLP","consists","of","two","hidden","layers",",","each","with","32","hidden","units",".","hidden_nonlinearity","(","callable","or","torch.nn.Module",")",":","Activation","function","for","intermediate","dense","layer","(","s",")",".","It","should","return","a","torch.Tensor.Set","it","to","None","to","maintain","a","linear","activation",".","hidden_w_init","(","callable",")",":","Initializer","function","for","the","weight","of","intermediate","dense","layer","(","s",")",".","The","function","should","return","a","torch.Tensor",".","hidden_b_init","(","callable",")",":","Initializer","function","for","the","bias","of","intermediate","dense","layer","(","s",")",".","The","function","should","return","a","torch.Tensor",".","output_nonlinearity","(","callable","or","torch.nn.Module",")",":","Activation","function","for","output","dense","layer",".","It","should","return","a","torch.Tensor",".","Set","it","to","None","to","maintain","a","linear","activation",".","output_w_init","(","callable",")",":","Initializer","function","for","the","weight","of","output","dense","layer","(","s",")",".","The","function","should","return","a","torch.Tensor",".","output_b_init","(","callable",")",":","Initializer","function","for","the","bias","of","output","dense","layer","(","s",")",".","The","function","should","return","a","torch.Tensor",".","layer_normalization","(","bool",")",":","Bool","for","using","layer","normalization","or","not","."]
docstr: garage.InOutSpec: Input and output space.
docstr_tok: ["garage.InOutSpec",":","Input","and","output","space","."]
code: def spec(self):
      """garage.InOutSpec: Input and output space."""
      input_space = akro.Box(-np.inf, np.inf, self._input_dim)
      output_space = akro.Box(-np.inf, np.inf, self._output_dim)
      return InOutSpec(input_space, output_space)
  
file_path: garage/src/garage/torch/embeddings/mlp_encoder.py
imports: import akro
  import numpy
  from garage import InOutSpec
  from garage.np.embeddings import Encoder
  from garage.torch.modules import MLPModule
label_desc: Use image node_id 1 for calling the MLPEncoder obj's underlying member method code with example usage: obj.spec() and returns: InOutSpec