(self, path: str)
Save the odel to a file.
        @param path (str): path to the model
Save the odel to a file.
Save the odel to a file .
def save(self, path: str):
        """ Save the odel to a file.
        @param path (str): path to the model
        """
        print('save model parameters to [%s]' % path, file=sys.stderr)

        params = {
            'args': dict(embed_size=self.model_embeddings.embed_size, hidden_size=self.hidden_size, dropout_rate=self.dropout_rate),
            'vocab': self.vocab,
            'state_dict': self.state_dict()
        }

        torch.save(params, path)
def save ( self , path : str ) : print ( 'save model parameters to [%s]' % path , file = sys . stderr ) params = { 'args' : dict ( embed_size = self . model_embeddings . embed_size , hidden_size = self . hidden_size , dropout_rate = self . dropout_rate ) , 'vocab' : self . vocab , 'state_dict' : self . state_dict ( ) } torch . save ( params , path )