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

Method _init_hidden

13_2_rnn_classification.py:129–132  ·  view source on GitHub ↗
(self, batch_size)

Source from the content-addressed store, hash-verified

127 return fc_output
128
129 def _init_hidden(self, batch_size):
130 hidden = torch.zeros(self.n_layers * self.n_directions,
131 batch_size, self.hidden_size)
132 return create_variable(hidden)
133
134
135# Train cycle

Callers 1

forwardMethod · 0.95

Calls 1

create_variableFunction · 0.85

Tested by

no test coverage detected