Training with GPU
ARatcliffe101 opened this issue · 2 comments
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)
- 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())
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?