class_docstr: A Multi-Layer Perception (MLP) model.
  
  There exists two ways to instantiate an :class:`MLP`:
  
  1. By specifying explicit channel sizes, *e.g.*,
  
     .. code-block:: python
  
        mlp = MLP([16, 32, 64, 128])
  
     creates a three-layer MLP with **differently** sized hidden layers.
  
  1. By specifying fixed hidden channel sizes over a number of layers,
     *e.g.*,
  
     .. code-block:: python
  
        mlp = MLP(in_channels=16, hidden_channels=32,
                  out_channels=128, num_layers=3)
  
     creates a three-layer MLP with **equally** sized hidden layers.
  
  Args:
      channel_list (List[int] or int, optional): List of input, intermediate
          and output channels such that :obj:`len(channel_list) - 1` denotes
          the number of layers of the MLP (default: :obj:`None`)
      in_channels (int, optional): Size of each input sample.
          Will override :attr:`channel_list`. (default: :obj:`None`)
      hidden_channels (int, optional): Size of each hidden sample.
          Will override :attr:`channel_list`. (default: :obj:`None`)
      out_channels (int, optional): Size of each output sample.
          Will override :attr:`channel_list`. (default: :obj:`None`)
      num_layers (int, optional): The number of layers.
          Will override :attr:`channel_list`. (default: :obj:`None`)
      dropout (float or List[float], optional): Dropout probability of each
          hidden embedding. If a list is provided, sets the dropout value per
          layer. (default: :obj:`0.`)
      act (str or Callable, optional): The non-linear activation function to
          use. (default: :obj:`"relu"`)
      act_first (bool, optional): If set to :obj:`True`, activation is
          applied before normalization. (default: :obj:`False`)
      act_kwargs (Dict[str, Any], optional): Arguments passed to the
          respective activation function defined by :obj:`act`.
          (default: :obj:`None`)
      norm (str or Callable, optional): The normalization function to
          use. (default: :obj:`"batch_norm"`)
      norm_kwargs (Dict[str, Any], optional): Arguments passed to the
          respective normalization function defined by :obj:`norm`.
          (default: :obj:`None`)
      plain_last (bool, optional): If set to :obj:`False`, will apply
          non-linearity, batch normalization and dropout to the last layer as
          well. (default: :obj:`True`)
      bias (bool or List[bool], optional): If set to :obj:`False`, the module
          will not learn additive biases. If a list is provided, sets the
          bias per layer. (default: :obj:`True`)
      **kwargs (optional): Additional deprecated arguments of the MLP layer.
class_docstr_tok: ["A","Multi-Layer","Perception","(","MLP",")","model",".","There","exists","two","ways","to","instantiate","an",":","class",":","`","MLP","`",":","1",".","By","specifying","explicit","channel","sizes",",","*","e.g",".","*",",","..","code-block",":",":","python","mlp","=","MLP","(","[","16",",","32",",","64",",","128","]",")","creates","a","three-layer","MLP","with","*","*","differently","*","*","sized","hidden","layers",".","1",".","By","specifying","fixed","hidden","channel","sizes","over","a","number","of","layers",",","*","e.g",".","*",",","..","code-block",":",":","python","mlp","=","MLP","(","in_channels=16",",","hidden_channels=32",",","out_channels=128",",","num_layers=3",")","creates","a","three-layer","MLP","with","*","*","equally","*","*","sized","hidden","layers",".","Args",":","channel_list","(","List","[","int","]","or","int",",","optional",")",":","List","of","input",",","intermediate","and","output","channels","such","that",":","obj",":","`","len","(","channel_list",")","-","1","`","denotes","the","number","of","layers","of","the","MLP","(","default",":",":","obj",":","`","None","`",")","in_channels","(","int",",","optional",")",":","Size","of","each","input","sample",".","Will","override",":","attr",":","`","channel_list","`",".","(","default",":",":","obj",":","`","None","`",")","hidden_channels","(","int",",","optional",")",":","Size","of","each","hidden","sample",".","Will","override",":","attr",":","`","channel_list","`",".","(","default",":",":","obj",":","`","None","`",")","out_channels","(","int",",","optional",")",":","Size","of","each","output","sample",".","Will","override",":","attr",":","`","channel_list","`",".","(","default",":",":","obj",":","`","None","`",")","num_layers","(","int",",","optional",")",":","The","number","of","layers",".","Will","override",":","attr",":","`","channel_list","`",".","(","default",":",":","obj",":","`","None","`",")","dropout","(","float","or","List","[","float","]",",","optional",")",":","Dropout","probability","of","each","hidden","embedding",".","If","a","list","is","provided",",","sets","the","dropout","value","per","layer",".","(","default",":",":","obj",":","`","0.","`",")","act","(","str","or","Callable",",","optional",")",":","The","non-linear","activation","function","to","use",".","(","default",":",":","obj",":","`","``","relu","''","`",")","act_first","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","True","`",",","activation","is","applied","before","normalization",".","(","default",":",":","obj",":","`","False","`",")","act_kwargs","(","Dict","[","str",",","Any","]",",","optional",")",":","Arguments","passed","to","the","respective","activation","function","defined","by",":","obj",":","`","act","`",".","(","default",":",":","obj",":","`","None","`",")","norm","(","str","or","Callable",",","optional",")",":","The","normalization","function","to","use",".","(","default",":",":","obj",":","`","``","batch_norm","''","`",")","norm_kwargs","(","Dict","[","str",",","Any","]",",","optional",")",":","Arguments","passed","to","the","respective","normalization","function","defined","by",":","obj",":","`","norm","`",".","(","default",":",":","obj",":","`","None","`",")","plain_last","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","will","apply","non-linearity",",","batch","normalization","and","dropout","to","the","last","layer","as","well",".","(","default",":",":","obj",":","`","True","`",")","bias","(","bool","or","List","[","bool","]",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","the","module","will","not","learn","additive","biases",".","If","a","list","is","provided",",","sets","the","bias","per","layer",".","(","default",":",":","obj",":","`","True","`",")","*","*","kwargs","(","optional",")",":","Additional","deprecated","arguments","of","the","MLP","layer","."]
docstr: Resets all learnable parameters of the module.
docstr_tok: ["Resets","all","learnable","parameters","of","the","module","."]
code: def reset_parameters(self):
      r"""Resets all learnable parameters of the module."""
      for lin in self.lins:
          lin.reset_parameters()
      for norm in self.norms:
          if hasattr(norm, "reset_parameters"):
              norm.reset_parameters()
  
file_path: pytorch_geometric/torch_geometric/nn/models/mlp.py
imports: import inspect
  import warnings
  from typing import Any, Callable, Dict, Final, List, Optional, Union
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch.nn import Identity
  from torch_geometric.nn.dense.linear import Linear
  from torch_geometric.nn.resolver import activation_resolver, normalization_resolver
  from torch_geometric.typing import NoneType
label_desc: Use image node_id 5 for calling the MLP obj's underlying member method code with example usage: obj.reset_parameters() without return types