MCPcopy Create free account
hub / github.com/Lancelot39/KGSF / decode_forced

Method decode_forced

model.py:259–313  ·  view source on GitHub ↗

Decode with a fixed, true sequence, computing loss. Useful for training, or ranking fixed candidates. :param ys: the prediction targets. Contains both the start and end tokens. :type ys: LongTensor[bsz, time] :param encode

(self, encoder_states, encoder_states_kg, encoder_states_db, attention_kg, attention_db, ys)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

forwardMethod · 0.95

Calls 1

_startsMethod · 0.95

Tested by

no test coverage detected