MCPcopy
hub / github.com/hunkim/PyTorchZeroToAll / init_hidden

Method init_hidden

seq2seq_models.py:59–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 return output, hidden
58
59 def init_hidden(self):
60 # (num_layers * num_directions, batch, hidden_size)
61 return cuda_variable(torch.zeros(self.n_layers, 1, self.hidden_size))
62
63
64class DecoderRNN(nn.Module):

Callers 1

testFunction · 0.95

Calls 1

cuda_variableFunction · 0.85

Tested by

no test coverage detected