DecodingResult

class opennmt.utils.DecodingResult(ids, lengths, log_probs, attention, state)[source]

Final decoding result.

Parameters
  • ids – The predicted ids of shape \([B, H, T_t]\).

  • lengths – The produced sequences length of shape \([B, H]\).

  • log_probs – The cumulated log probabilities of shape \([B, H]\).

  • attention – The attention history of shape \([B, H, T_t, T_s]\).

  • state – The final decoding state.

Inherits from: builtins.tuple