From f17a530ef374703a7241c7712f505f083be4c31c Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Mon, 20 Jan 2025 18:43:06 +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 286cfdcaa..326483aba 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 @@ -415,8 +415,6 @@ def _masked_scatter( merged_dim_map: Dict[Dim, Dim], ) -> T: if isinstance(s, Tensor): - if in_dim not in s.dims: - return s # e.g. scalar or so, independent from masking assert isinstance(backup, Tensor) # Do the reverse of _masked_select above. # First replace the dims back.