deepmorpheus/model.py
def init_char_hidden(self):
        """Initialise char LSTM hidden state."""
        self.char_lstm_hidden = (
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.char_lstm_hidden_dim).to(self.device),
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.char_lstm_hidden_dim).to(self.device),
        )
Initialise char LSTM hidden state.
Initialise char LSTM hidden state.
Initialise char LSTM hidden state .
def init_char_hidden(self):
        self.char_lstm_hidden = (
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.char_lstm_hidden_dim).to(self.device),
            torch.zeros(self.directions * self.hparams.num_lstm_layers, 1, self.hparams.char_lstm_hidden_dim).to(self.device),
        )
def init_char_hidden ( self ) : self . char_lstm_hidden = ( torch . zeros ( self . directions * self . hparams . num_lstm_layers , 1 , self . hparams . char_lstm_hidden_dim ) . to ( self . device ) , torch . zeros ( self . directions * self . hparams . num_lstm_layers , 1 , self . hparams . char_lstm_hidden_dim ) . to ( self . device ) , )
Initialise char LSTM hidden state.
Initialise char LSTM hidden state .
"""Initialise char LSTM hidden state."""
self