nlpmodels/models/transformer.py
def _init_parameters(self):
        """
        Initialize all parameters to be trained using Xavier Uniform.
        Note: parameters added to buffer will not be affected.
        """
        for parameter in self.parameters():
            if parameter.dim() - 1:
                nn.init.xavier_uniform_(parameter)

        Initialize all parameters to be trained using Xavier Uniform.
        Note: parameters added to buffer will not be affected.
        
Initialize all parameters to be trained using Xavier Uniform.
Note: parameters added to buffer will not be affected.
Initialize all parameters to be trained using Xavier Uniform . Note : parameters added to buffer will not be affected .
def _init_parameters(self):
        for parameter in self.parameters():
            if parameter.dim() - 1:
                nn.init.xavier_uniform_(parameter)
def _init_parameters ( self ) : for parameter in self . parameters ( ) : if parameter . dim ( ) - 1 : nn . init . xavier_uniform_ ( parameter )
Initialize all parameters to be trained using Xavier Uniform.
Initialize all parameters to be trained using Xavier Uniform .
"""
        Initialize all parameters to be trained using Xavier Uniform.
        Note: parameters added to buffer will not be affected.
        """
self