YuanGongND / gopt

Code for the ICASSP 2022 paper "Transformer-Based Multi-Aspect Multi-Granularity Non-native English Speaker Pronunciation Assessment".
BSD 3-Clause "New" or "Revised" License
152 stars 28 forks source link

run the code on cpu #38

Open Faezehsgh opened 6 months ago

Faezehsgh commented 6 months ago

I'm getting inference from the model, but I want to run it on the CPU. How can I set the model to not use the GPU? Because I didn't see any part of the code that sets the flag for GPU or CPU.

YuanGongND commented 6 months ago

If you mean starting from the GOP features, you can just run our colab script and select to use CPU (Google to see how to do it). If you only care about inference, you can set the training epoch = 1, so the model will quickly finish training and start inference. If you do not see any error, then it means the code can be run on CPU without modification, otherwise if you see an error, that can be your starting point for debugging.

-Yuan