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

Training with GPU #784

Open
ARatcliffe101 opened this issue Dec 22, 2022 · 2 comments
Open

Training with GPU #784

ARatcliffe101 opened this issue Dec 22, 2022 · 2 comments

Comments

@ARatcliffe101
Copy link

Hello,

I have all the gpu packages and no cpu ones yet It wont train via gpu usign the default code:

from imageai.Classification.Custom import ClassificationModelTrainer model_trainer = ClassificationModelTrainer() model_trainer.setModelTypeAsResNet50() model_trainer.setDataDirectory("idenprof") model_trainer.trainModel(num_experiments=100, batch_size=32)

@OlafenwaMoses
Copy link
Owner

@ARatcliffe101

  • Did you install the GPU dependencies
  • If yes, can you try running the code below in a Python file to confirm GPU is detectable by your dependency installations
import torch
print(torch.cuda.is_available())

@SupercraftD
Copy link

Hi, I'm not the original poster but I am also having a similar problem. I am trying to train an image recognition AI but it will not use the GPU. the code snippet you provided evaluated to false, so I think that is the problem. However, I have tried to install cuda before, and it failed on the "Nsight Visual Studio Edition". I tried again and only selected the cuda files in the nvidia cuda installer. That showed it successfully installed, but it still won't work. I don't think it is very clear, so how exactly do I install cuda?

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