MCPcopy Create free account
hub / github.com/XuezheMax/flowseq / translate_sample

Method translate_sample

flownmt/flownmt.py:254–287  ·  view source on GitHub ↗

Args: src_sents: Tensor [batch, src_length] tensor for source sentences src_masks: Tensor [batch, src_length] or None tensor for source masks n_len: int (default 1) number of length candidates n

(self, src_sents: torch.Tensor, src_masks: torch.Tensor,
                         n_len: int = 1, n_tr: int = 1, tau: float = 0.0)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

sample_from_priorMethod · 0.95
decodeMethod · 0.45

Tested by

no test coverage detected