added warning
This commit is contained in:
@@ -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):
|
|||||||
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 = []
|
||||||
|
|||||||
Reference in New Issue
Block a user