|View source on GitHub|
A library of sampler for use with SamplingDecoders.
class CustomSampler: Base abstract class that allows the user to customize sampling.
class GreedyEmbeddingSampler: A sampler for use during inference.
class InferenceSampler: A helper to use during inference with a custom sampling function.
class SampleEmbeddingSampler: A sampler for use during inference.
class Sampler: Interface for implementing sampling in seq2seq decoders.
class ScheduledEmbeddingTrainingSampler: A training sampler that adds scheduled sampling.
class ScheduledOutputTrainingSampler: A training sampler that adds scheduled sampling directly to outputs.
class TrainingSampler: A Sampler for use during training.
bernoulli_sample(...): Samples from Bernoulli distribution.
categorical_sample(...): Samples from categorical distribution.
Initializer: The central part of internal API.
TensorLike: The central part of internal API.