burchim/EfficientConformer

IndexError: tuple index out of range

Silentssss opened this issue · 2 comments

Hi!, That is my ERROR and my para, Can you tell me how to fix it? Iam very confused!
python main.py --config_file configs/EfficientConformerCTCSmall.json --prepare_dataset --create_tokenizer

image

Hi,

TimeMasking's forward function now requires the batch dimension to process spectrograms.

Including the batch dimension should fix the issue:
x[b:b+1, :, :x_len[b]] = torchaudio.transforms.TimeMasking(time_mask_param=T).forward(x[b:b+1, :, :x_len[b]])

instead of:
x[b, :, :x_len[b]] = torchaudio.transforms.TimeMasking(time_mask_param=T).forward(x[b, :, :x_len[b]])

Hi,

TimeMasking's forward function now requires the batch dimension to process spectrograms.

Including the batch dimension should fix the issue: x[b:b+1, :, :x_len[b]] = torchaudio.transforms.TimeMasking(time_mask_param=T).forward(x[b:b+1, :, :x_len[b]])

instead of: x[b, :, :x_len[b]] = torchaudio.transforms.TimeMasking(time_mask_param=T).forward(x[b, :, :x_len[b]])

Thanks! It works for me!
image