Getting started
Configuration
Usage
API
Randomly samples from model outputs.
Inherits from: opennmt.utils.Sampler
opennmt.utils.Sampler
Initializes the random sampler.
from_top_k – Sample from the top K predictions instead of the full distribution.
temperature – Divide logits by this value. High temperatures generate more random samples.