Skip to content

when training this model by the our custom datasets we are facing the below error constantly "Dimension out of range (expected to be in range of [-1, 0], but got 1)" #225

@Rajan-Mahato

Description

@Rajan-Mahato

IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)
we have converted our dataset as LJspeech dataset .
our custom dataset is on hugging face named "procit008/small" .

[rank0]:[W404 15:57:59.072467923 ProcessGroupNCCL.cpp:1496] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
Traceback (most recent call last):
File "/home/procit/procit/vits/train.py", line 290, in
main()
File "/home/procit/procit/vits/train.py", line 50, in main
mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,))
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/multiprocessing/spawn.py", line 340, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method="spawn")
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/multiprocessing/spawn.py", line 296, in start_processes
while not context.join():
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/multiprocessing/spawn.py", line 215, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 0 terminated with the following error:
Traceback (most recent call last):
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/multiprocessing/spawn.py", line 90, in _wrap
fn(i, *args)
File "/home/procit/procit/vits/train.py", line 117, in run
train_and_evaluate(rank, epoch, hps, [net_g, net_d], [optim_g, optim_d], [scheduler_g, scheduler_d], scaler, [train_loader, eval_loader], logger, [writer, writer_eval])
File "/home/procit/procit/vits/train.py", line 137, in train_and_evaluate
for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths) in enumerate(train_loader):
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 708, in next
data = self._next_data()
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1480, in _next_data
return self._process_data(data)
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1505, in _process_data
data.reraise()
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/_utils.py", line 733, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 349, in _worker_loop
data = fetcher.fetch(index) # type: ignore[possibly-undefined]
File "/home/procit/procit/vits/env/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 55, in fetch
return self.collate_fn(data)
File "/home/procit/procit/vits/data_utils.py", line 119, in call
max_spec_len = max([x[1].size(1) for x in batch])
File "/home/procit/procit/vits/data_utils.py", line 119, 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