Skip to content

Commit 0acbda8

Browse files
committed
Modules to mods
1 parent 27a2b38 commit 0acbda8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

speechbrain/alignment/ctc_segmentation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ def __init__(
230230
"""Initialize the CTCSegmentation module."""
231231
# Prepare ASR model
232232
if not (
233-
hasattr(asr_model, "modules")
234-
and hasattr(asr_model.modules, "decoder")
235-
and hasattr(asr_model.modules.decoder, "ctc_weight")
233+
hasattr(asr_model, "mods")
234+
and hasattr(asr_model.mods, "decoder")
235+
and hasattr(asr_model.mods.decoder, "ctc_weight")
236236
):
237237
raise AttributeError(
238-
"The given asr_model has no CTC decoder in asr_model.modules.decoder!"
238+
"The given asr_model has no CTC decoder in asr_model.mods.decoder!"
239239
)
240240
if not hasattr(asr_model, "tokenizer"):
241241
raise AttributeError(
@@ -244,7 +244,7 @@ def __init__(
244244
self.asr_model = asr_model
245245
self._encode = self.asr_model.encode_batch
246246
# Assumption: log-softmax is already included in ctc_forward_step
247-
self._ctc = self.asr_model.modules.decoder.ctc_forward_step
247+
self._ctc = self.asr_model.mods.decoder.ctc_forward_step
248248
self._tokenizer = self.asr_model.tokenizer
249249

250250
# Apply configuration

0 commit comments

Comments
 (0)