DecodingResult

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

Final decoding result.

Parameters
  • ids – The predicted ids of shape [B,H,Tt].

  • 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,Tt,Ts].

  • state – The final decoding state.

Inherits from: builtins.tuple