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

Method forward

beginner_source/nlp/deep_learning_tutorial.py:276–280  ·  view source on GitHub ↗
(self, bow_vec)

Source from the content-addressed store, hash-verified

274 # to worry about that here
275
276 def forward(self, bow_vec):
277 # Pass the input through the linear layer,
278 # then pass that through log_softmax.
279 # Many non-linearities and other functions are in torch.nn.functional
280 return F.log_softmax(self.linear(bow_vec), dim=1)
281
282
283def make_bow_vector(sentence, word_to_ix):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected