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])