DeepLearningExamples
DeepLearningExamples copied to clipboard
[Fastpitch/Pytorch] AssertionError for pitch and mel size when used on my own datasets.
I am getting the following error when I try using Fastpitch on my own datasets. I know it has something to do with data preparation. I am trying this model on the child speech dataset. Any advice for me?
Traceback (most recent call last):
File "train.py", line 548, in <module>
main()
File "train.py", line 408, in main
for batch in train_loader:
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 518, in __next__
data = self._next_data()
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1200, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1226, in _process_data
data.reraise()
File "/opt/conda/lib/python3.8/site-packages/torch/_utils.py", line 434, in reraise
raise self.exc_type(msg)
AssertionError: Caught AssertionError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/workspace/fastpitch/DeepLearningExamples/PyTorch/SpeechSynthesis/FastPitch/fastpitch/data_function.py", line 228, in __getitem__
assert pitch.size(-1) == mel.size(-1)
AssertionError
I even try to remove some of the data manually but not possible to do it for all audio files. Any ideas on how I can get past this issue?