MCPcopy Create free account
hub / github.com/HA-Transformer/MAT / adapt_target

Method adapt_target

fairseq/modules/adaptive_softmax.py:122–145  ·  view source on GitHub ↗

In order to be efficient, the AdaptiveSoftMax does not compute the scores for all the word of the vocabulary for all the examples. It is thus necessary to call the method adapt_target of the AdaptiveSoftMax layer inside each forward pass.

(self, target)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

forwardMethod · 0.95
get_log_probMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected