From 6ed21f5a81387b204734da16ae50fbf327d4a3cb Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Mon, 20 Jan 2025 18:50:18 +0100 Subject: [PATCH] fix masked scatter --- .../zeyer/experiments/exp2024_04_23_baselines/recog_ext/ctc.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/users/zeyer/experiments/exp2024_04_23_baselines/recog_ext/ctc.py b/users/zeyer/experiments/exp2024_04_23_baselines/recog_ext/ctc.py index b00f45175..cdbeb6eb5 100644 --- a/users/zeyer/experiments/exp2024_04_23_baselines/recog_ext/ctc.py +++ b/users/zeyer/experiments/exp2024_04_23_baselines/recog_ext/ctc.py @@ -418,8 +418,6 @@ def _masked_scatter( assert isinstance(backup, Tensor) if in_dim not in s.dims: s = rf.expand_dim(s, in_dim) - if in_dim not in backup.dims: - backup = rf.expand_dim(backup, in_dim) # Do the reverse of _masked_select above. # First replace the dims back. if any(d in reverse_dim_map for d in s.dims):