Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about the CUDA and Torch version #1

Open
chikiuso opened this issue Jul 2, 2022 · 4 comments
Open

about the CUDA and Torch version #1

chikiuso opened this issue Jul 2, 2022 · 4 comments

Comments

@chikiuso
Copy link

chikiuso commented Jul 2, 2022

Hello, may I ask about the cuda and torch version this GitHub run on? thanks a lot!

@rishikksh20
Copy link
Owner

Cuda 11, pytorch 1.8.2

@chikiuso
Copy link
Author

chikiuso commented Jul 2, 2022

Hi @rishikksh20 , thanks for your reply, I still got the following error message with cuda 11 and torch 1.8.2, may I ask do you have any hints I could solve it? thanks :

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
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/Avocodo-pytorch/meldataset.py", line 139, in getitem
mel = mel_spectrogram(audio, self.n_fft, self.num_mels,
File "/root/Avocodo-pytorch/meldataset.py", line 61, in mel_spectrogram
y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect')
File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 4015, in _pad
assert len(pad) == 4, "4D tensors expect 4 values for padding"
AssertionError: 4D tensors expect 4 values for padding

@rishikksh20
Copy link
Owner

Use Torch 1.8.0 with Cuda 11.1

@chikiuso
Copy link
Author

chikiuso commented Jul 4, 2022

Hi @rishikksh20 , I tried it with torch 1.8 and cuda 11.1, got the following error message, thanks

Traceback (most recent call last):
File "train.py", line 272, in
main()
File "train.py", line 268, in main
train(0, a, h)
File "train.py", line 114, in train
for i, batch in enumerate(train_loader):
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 517, in next
data = self._next_data()
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1225, in _process_data
data.reraise()
File "/opt/conda/lib/python3.8/site-packages/torch/_utils.py", line 429, 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
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/Avocodo-pytorch/meldataset.py", line 139, in getitem
mel = mel_spectrogram(audio, self.n_fft, self.num_mels,
File "/root/Avocodo-pytorch/meldataset.py", line 61, in mel_spectrogram
y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect')
File "/opt/conda/lib/python3.8/site-packages/torch/nn/functional.py", line 4012, in _pad
assert len(pad) == 4, "4D tensors expect 4 values for padding"
AssertionError: 4D tensors expect 4 values for padding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants