MCPcopy Create free account
hub / github.com/pytorch/tutorials / __init__

Method __init__

intermediate_source/seq2seq_translation_tutorial.py:376–380  ·  view source on GitHub ↗
(self, hidden_size, output_size)

Source from the content-addressed store, hash-verified

374
375class DecoderRNN(nn.Module):
376 def __init__(self, hidden_size, output_size):
377 super(DecoderRNN, self).__init__()
378 self.embedding = nn.Embedding(output_size, hidden_size)
379 self.gru = nn.GRU(hidden_size, hidden_size, batch_first=True)
380 self.out = nn.Linear(hidden_size, output_size)
381
382 def forward(self, encoder_outputs, encoder_hidden, target_tensor=None):
383 batch_size = encoder_outputs.size(0)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected