Skip to content

mat1 and mat2 shapes cannot be multiplied (80x513 and 1x513) #162

Open
@Huan-phonetic

Description

Dear authors,

Maybe it seems novice but when I tried train.py with my dataset (and also LJ dataset), I found the y variable is having only one frame (1, 513). Any idea why this happens? My audios are longer than 2s at the least.

Traceback (most recent call last):
File "F:\HiFiGAN\hifi-gan\train.py", line 271, in
main()
File "F:\HiFiGAN\hifi-gan\train.py", line 267, in main
train(0, a, h)
File "F:\HiFiGAN\hifi-gan\train.py", line 113, in train
for i, batch in enumerate(train_loader):
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data\dataloader.py", line 633, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data\dataloader.py", line 1345, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data\dataloader.py", line 1371, in _process_data
data.reraise()
File "G:\Conda\envs\pytorch\Lib\site-packages\torch_utils.py", line 644, in reraise
raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data_utils\worker.py", line 308, in worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\Conda\envs\pytorch\Lib\site-packages\torch\utils\data_utils\fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
~~~~~~~~~~~~^^^^^
File "F:\HiFiGAN\hifi-gan\meldataset.py", line 139, in getitem
mel = mel_spectrogram(audio, self.n_fft, self.num_mels,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\HiFiGAN\hifi-gan\meldataset.py", line 69, in mel_spectrogram
spec = torch.matmul(mel_basis[str(fmax)+'
'+str(y.device)], spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 shapes cannot be multiplied (80x513 and 1x513)

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