From aa2237a79367367b8798cf9b75f54aee33ad29da Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Sat, 9 Jul 2022 10:11:54 +0800 Subject: [PATCH] Bug fix --- egs/librispeech/ASR/pruned_transducer_stateless7/optim.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py b/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py index fa951d94c..3b57c37e8 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py @@ -470,6 +470,8 @@ param_rms_smooth1: Smoothing proportion for parameter matrix, if assumed rank of # grad_cov_{dim}, which are for periodically updating the # learning-rate matrices. size = grad.shape[dim] + if size == 1: + continue grad_cov = state[f"grad_cov_{dim}"] this_m = p.transpose(-1, dim).reshape(-1, size) # parameter matrix M this_g = grad.transpose(-1, dim).reshape(-1, size) # M_grad