original_docstring: Initialize the model weights according to the specified method name
          
          Method names are from the `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ module. 
          Allowed method names are *uniform_*, *normal_*, *constant_*, etc.
  
          The following layers will be initialized:
          - torch.nn.Linear
          
          :param method_name: `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ method name (default: "orthogonal\_")
          :type method_name: str, optional
          :param args: Positional arguments of the method to be called
          :type args: tuple, optional
          :param kwargs: Key-value arguments of the method to be called
          :type kwargs: dict, optional
          
docstring: Initialize the model weights according to the specified method name
  Method names are from the `torch.nn.init `_ module.
  
  The following layers will be initialized:
  torch.nn.Linear
docstring_tokens: Initialize the model weights according to the specified method name Method names are from the ` torch . nn . init ` _ module . The following layers will be initialized : torch . nn . Linear
code: def init_weights(self, method_name: str = "orthogonal_", *args, **kwargs) -> None:
          """Initialize the model weights according to the specified method name
          
          Method names are from the `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ module. 
          Allowed method names are *uniform_*, *normal_*, *constant_*, etc.
  
          The following layers will be initialized:
          - torch.nn.Linear
          
          :param method_name: `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ method name (default: "orthogonal\_")
          :type method_name: str, optional
          :param args: Positional arguments of the method to be called
          :type args: tuple, optional
          :param kwargs: Key-value arguments of the method to be called
          :type kwargs: dict, optional
          """
          def _update_weights(module, method_name, args, kwargs):
              for layer in module:
                  if isinstance(layer, torch.nn.Sequential):
                      _update_weights(layer)
                  elif isinstance(layer, torch.nn.Linear):
                      exec("torch.nn.init.{}(layer.weight, *args, **kwargs)".format(method_name))
          
          _update_weights(self.children(), method_name, args, kwargs)
code_tokens: def init_weights ( self , method_name : str = "orthogonal_" , * args , ** kwargs ) -> None : def _update_weights ( module , method_name , args , kwargs ) : for layer in module : if isinstance ( layer , torch . nn . Sequential ) : _update_weights ( layer ) elif isinstance ( layer , torch . nn . Linear ) : exec ( "torch.nn.init.{}(layer.weight, *args, **kwargs)" . format ( method_name ) ) _update_weights ( self . children ( ) , method_name , args , kwargs )
short_docstring: Initialize the model weights according to the specified method name
  Method names are from the `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ module.
short_docstring_tokens: Initialize the model weights according to the specified method name Method names are from the ` torch . nn . init <https : // pytorch . org / docs / stable / nn . init . html > ` _ module .
comment: """Initialize the model weights according to the specified method name
          
          Method names are from the `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ module. 
          Allowed method names are *uniform_*, *normal_*, *constant_*, etc.
  
          The following layers will be initialized:
          - torch.nn.Linear
          
          :param method_name: `torch.nn.init <https://pytorch.org/docs/stable/nn.init.html>`_ method name (default: "orthogonal\_")
          :type method_name: str, optional
          :param args: Positional arguments of the method to be called
          :type args: tuple, optional
          :param kwargs: Key-value arguments of the method to be called
          :type kwargs: dict, optional
          """