MCPcopy Create free account
hub / github.com/pytorch/examples / forward

Method forward

distributed/rpc/rnn/rnn.py:90–96  ·  view source on GitHub ↗
(self, input, hidden)

Source from the content-addressed store, hash-verified

88 self.decoder_rref = rpc.remote(ps, Decoder, args=(ntoken, nhid, dropout))
89
90 def forward(self, input, hidden):
91 # pass input to the remote embedding table and fetch emb tensor back
92 emb = _remote_method(EmbeddingTable.forward, self.emb_table_rref, input)
93 output, hidden = self.rnn(emb, hidden)
94 # pass output to the remote decoder and get the decoded output back
95 decoded = _remote_method(Decoder.forward, self.decoder_rref, output)
96 return decoded, hidden
97
98 def parameter_rrefs(self):
99 remote_params = []

Callers

nothing calls this directly

Calls 1

_remote_methodFunction · 0.70

Tested by

no test coverage detected