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

Trouble with urbansounddataset #7

Open
roilhi opened this issue May 3, 2023 · 2 comments
Open

Trouble with urbansounddataset #7

roilhi opened this issue May 3, 2023 · 2 comments

Comments

@roilhi
Copy link

roilhi commented May 3, 2023

I'm getting the following error when running the urbansounddataset.py file:
resampled = torch.nn.functional.conv1d(waveform[:, None], kernel, stride=orig_freq)
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same. I've tried to figure out why by checking my variables, but i'm just struggling with that. Do you have any idea? I'm using windows, and torch 1.13.0+cu117.

@Hzaatiti
Copy link

Hzaatiti commented Jul 3, 2023

It seems this is caused by not having both tensors on the same device, you should add the .to(device) to both or remove from both.

@turinaf
Copy link

turinaf commented Jan 29, 2024

@roilhi this is solved in this pull request #6 by adding device to Resampler.

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

3 participants