From 6e598cb18dc0875b8b56e139df960a266efe31c8 Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Thu, 8 Dec 2022 18:36:29 +0800 Subject: [PATCH] Reduce top grad_scale limit from 128 to 32. --- egs/librispeech/ASR/pruned_transducer_stateless7/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/train.py b/egs/librispeech/ASR/pruned_transducer_stateless7/train.py index bc0e8c126..14934439a 100755 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/train.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/train.py @@ -912,7 +912,7 @@ def train_one_epoch( # behavior depending on the current grad scale. cur_grad_scale = scaler._scale.item() - if cur_grad_scale < 8.0 or (cur_grad_scale < 128.0 and batch_idx % 400 == 0): + if cur_grad_scale < 8.0 or (cur_grad_scale < 32.0 and batch_idx % 400 == 0): scaler.update(cur_grad_scale * 2.0) if cur_grad_scale < 0.01: logging.warning(f"Grad scale is small: {cur_grad_scale}")