deepmorpheus/model.py
def init_word_hidden(self):
        """Initialise word LSTM hidden state."""
        self.word_lstm_hidden = (
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.word_lstm_hidden_dim).to(self.device),
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.word_lstm_hidden_dim).to(self.device),
        )
Initialise word LSTM hidden state.
Initialise word LSTM hidden state.
Initialise word LSTM hidden state .
def init_word_hidden(self):
        self.word_lstm_hidden = (
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.word_lstm_hidden_dim).to(self.device),
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.word_lstm_hidden_dim).to(self.device),
        )
def init_word_hidden ( self ) : self . word_lstm_hidden = ( torch . zeros ( self . directions * self . hparams . num_lstm_layers , 1 , self . hparams . word_lstm_hidden_dim ) . to ( self . device ) , torch . zeros ( self . directions * self . hparams . num_lstm_layers , 1 , self . hparams . word_lstm_hidden_dim ) . to ( self . device ) , )
Initialise word LSTM hidden state.
Initialise word LSTM hidden state .
"""Initialise word LSTM hidden state."""
self