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

Using GPU in the training #1320

Open
RamadanHussein opened this issue Oct 14, 2024 · 3 comments
Open

Using GPU in the training #1320

RamadanHussein opened this issue Oct 14, 2024 · 3 comments

Comments

@RamadanHussein
Copy link

RamadanHussein commented Oct 14, 2024

I'm training EasyOCR and noticed that the training is using the CPU while the machine has a GPU with tensors , any configuration hat can help to force the model to use the GPU

CPU vs  GPU

@akachammile
Copy link

akachammile commented Oct 15, 2024

you can run torch.cuda.is_available() to test gpu is available

@RamadanHussein
Copy link
Author

Yes it is available however I noticed this behavior that it doesn't use the cuda , is this due to the torch version because I'm using 12.2 while my GPU card is RTX 4090

@romanvelichkin
Copy link

Are you using trainer.ipynb from this repo? Because it works for me.

is this due to the torch version because I'm using 12.2

You're probably talking about CUDA version, not torch version. I would recommend create python environment specifically for EasyOCR, because it will install proper pytorch and cuda versions it needs. Otherwise you could have your own versions or overwrite EasyOCR confing with different versions.

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