espnet2.legacy.nets.beam_search.Hypothesis
Less than 1 minute
espnet2.legacy.nets.beam_search.Hypothesis
class espnet2.legacy.nets.beam_search.Hypothesis(yseq: Tensor, score: float | Tensor = 0, scores: Dict[str, float | Tensor] | None = None, states: Dict[str, Any] | None = None, hs: List[Tensor] | None = None)
Bases: _Hypothesis
Hypothesis tuple with independent default scores, states, and history.
Keep named-tuple operations such as _replace and _asdict used by beam-search consumers while allocating mutable defaults per construction.
Create a hypothesis, retaining explicitly supplied containers.
asdict() → dict
Convert data to JSON-friendly dict.
