ksanjeevan / crnn-audio-classification

UrbanSound classification using Convolutional Recurrent Networks in PyTorch
MIT License
380 stars 80 forks source link

When I was running the task, I found that the GPU was not used, but the CPU. How should I modify it to make the code run on the GPU? #13

Closed shayxurui closed 3 years ago

ksanjeevan commented 3 years ago

As you can see here: https://github.com/ksanjeevan/crnn-audio-classification/blob/f09449b87ed61d28b82931c7055d033a7b69160b/train/base_trainer.py#L20

The trainer checks to see if cuda is available on your machine. Are you sure you're running the code on a machine that has cuda installed?