Commit 66a84b63 authored by lukovnikov's avatar lukovnikov
Browse files

added warning

parent 070f3b21
...@@ -83,7 +83,7 @@ class BertAdam(Optimizer): ...@@ -83,7 +83,7 @@ class BertAdam(Optimizer):
max_grad_norm=max_grad_norm) max_grad_norm=max_grad_norm)
super(BertAdam, self).__init__(params, defaults) super(BertAdam, self).__init__(params, defaults)
# warning for t_total exceeded # warning for t_total exceeded
self._warned_for_t_total_at_progress = -1 if schedule == "warmup_linear" else float("inf") self._warned_for_t_total_at_progress = -1 if schedule == "warmup_linear" else float("inf") # warning is not active with other schedules (since it doesn't break them)
def get_lr(self): def get_lr(self):
lr = [] lr = []
......
...@@ -72,7 +72,7 @@ class OpenAIAdam(Optimizer): ...@@ -72,7 +72,7 @@ class OpenAIAdam(Optimizer):
max_grad_norm=max_grad_norm) max_grad_norm=max_grad_norm)
super(OpenAIAdam, self).__init__(params, defaults) super(OpenAIAdam, self).__init__(params, defaults)
# warning for t_total exceeded # warning for t_total exceeded
self._warned_for_t_total_at_progress = -1 if schedule == "warmup_linear" else float("inf") self._warned_for_t_total_at_progress = -1 if schedule == "warmup_linear" else float("inf") # warning is not active with other schedules (since it doesn't break them)
def get_lr(self): def get_lr(self):
lr = [] lr = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment