opennmt.schedules.RsqrtDecay

class opennmt.schedules.RsqrtDecay(scale, warmup_steps)[source]

Decay based on the reciprocal of the step square root.

Inherits from: keras.optimizer_v2.learning_rate_schedule.LearningRateSchedule

__init__(scale, warmup_steps)[source]

Initializes the decay function.

Parameters
  • scale – The scale constant.

  • warmup_steps – The number of warmup steps.