Skip to content

Max spec len error #19

Description

@MohanThippeswamy

Hi quickVc,
I'm getting dimension error for my own dataset. what should I check for.
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Traceback (most recent call last):
File "data_utils_new_new.py", line 312, in
for batch_idx, (c, spec, y) in enumerate(train_loader):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 633, in next
data = self._next_data()
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/usr/local/lib/python3.8/dist-packages/torch/_utils.py", line 644, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
File "data_utils_new_new.py", line 124, in call
max_spec_len = max([x[1].size(1) for x in batch])
File "data_utils_new_new.py", line 124, in
max_spec_len = max([x[1].size(1) for x in batch])
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions