Base abstract class that allows the user to customize sampling.
sampler_custom(
initialize_fn,
sample_fn,
next_inputs_fn,
sample_ids_shape = NULL,
sample_ids_dtype = NULL
)
callable that returns (finished, next_inputs) for the first iteration.
callable that takes (time, outputs, state) and emits tensor sample_ids.
callable that takes (time, outputs, state, sample_ids) and emits (finished, next_inputs, next_state).
Either a list of integers, or a 1-D Tensor of type int32, the shape of each value in the sample_ids batch. Defaults to a scalar.
The dtype of the sample_ids tensor. Defaults to int32.
None