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

Method init_hidden

seq2seq_models.py:82–84  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80 return output, hidden
81
82 def init_hidden(self):
83 # (num_layers * num_directions, batch, hidden_size)
84 return cuda_variable(torch.zeros(self.n_layers, 1, self.hidden_size))
85
86
87class AttnDecoderRNN(nn.Module):

Callers

nothing calls this directly

Calls 1

cuda_variableFunction · 0.85

Tested by

no test coverage detected