From 8c44ff26f7f7722fefc6f50042270c78aa728abd Mon Sep 17 00:00:00 2001 From: Daniel Povey Date: Tue, 12 Jul 2022 08:36:45 +0800 Subject: [PATCH] Fix bug in batching code for scalars --- egs/librispeech/ASR/pruned_transducer_stateless7/optim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py b/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py index e5c597982..cbe5af927 100644 --- a/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py +++ b/egs/librispeech/ASR/pruned_transducer_stateless7/optim.py @@ -85,7 +85,7 @@ class BatchedOptimizer(Optimizer): yield p_stacked, state # <-- calling code will do the actual optimization here! # Now un-stack the parameter changes for i,p in enumerate(batch): - p[:] = p_stacked[i] + p.copy_(p_stacked[i])