deepmorpheus/model.py
def training_step(self, sentence, batch_idx):
        """Predicts the output of the provided input for the model and calculates loss over it"""
        self.init_word_hidden()
        outputs = self.forward(sentence)
        # Shape: (sentence_len, 9, num_tag_output)

        loss = self.nll_loss(sentence, outputs)

        logs = {'train_loss': loss}
        return {'loss': loss, 'log': logs}
Predicts the output of the provided input for the model and calculates loss over it
Predicts the output of the provided input for the model and calculates loss over it
Predicts the output of the provided input for the model and calculates loss over it
def training_step(self, sentence, batch_idx):
        self.init_word_hidden()
        outputs = self.forward(sentence)
        loss = self.nll_loss(sentence, outputs)
        logs = {'train_loss': loss}
        return {'loss': loss, 'log': logs}
def training_step ( self , sentence , batch_idx ) : self . init_word_hidden ( ) outputs = self . forward ( sentence ) loss = self . nll_loss ( sentence , outputs ) logs = { 'train_loss' : loss } return { 'loss' : loss , 'log' : logs }
Predicts the output of the provided input for the model and calculates loss over it
Predicts the output of the provided input for the model and calculates loss over it
"""Predicts the output of the provided input for the model and calculates loss over it""" # Shape: (sentence_len, 9, num_tag_output)
self
sentence
batch_idx