How to Implement Scheduled Sampling in Keras?

Viewed 531
1 Answers

Tensorflow contrib API is deprecated in Tensorflow2.x version. Few libraries of tf.contrib are moved to Tensorflow addons.

Use tfa.seq2seq.ScheduledOutputTrainingSampler

tfa.seq2seq.ScheduledOutputTrainingSampler(
    sampling_probability: tfa.types.TensorLike,
    time_major: bool = False,
    seed: Optional[int] = None,
    next_inputs_fn: Optional[Callable] = None
)

For more information on the library find here

Related