Skip to content

question about learning rate #3

@HiXiaochen

Description

@HiXiaochen

In 《attention is all you need》,lrate in noam decay they used is formulated as:
"lrate = d−0.5 · min(step_num−0.5, step_num · warmup_steps−1.5)"
But in your code,I found there is an original_lr which is 0.05:
self._set_rate(
self.original_lr *
( self.model_size ** -0.5 * min(self._step ** (-0.5),
self._step * self.warmup_steps**(-1.5))))
Why do we need to add this term?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions