-
Notifications
You must be signed in to change notification settings - Fork 161
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
how to run the this code using gpu #10
Comments
I also meet this issue. Have you solve it? |
same issue |
You can call .cuda() or to('gpu:0') to move model to gpu.
|
Like this, For example: finish the rest like that |
Hi sunguwei, I just refactor this repo, you can check it in https://github.com/mayuanjason/MTCNN_face_detection_alignment_pytorch It can run on GPU. Here are some improvments I made: |
I found that it is a bit slow when I run this code. Then I check the usage of gpu and I found this code was run on the cpu. So I want to change the code to run on the gpu. But I found the type of weight of this model is torch.FloatTensor. Is that mean I cannot use the gpu to run this code directly? Is that any solution can help me to run this code on gpu?
Here is the error:
RuntimeError: Expected object of type torch.FloatTensor but found type torch.cuda.FloatTensor for argument #2 'weight'
The text was updated successfully, but these errors were encountered: