Closed goodwin64 closed 10 months ago
Ah, according to this suggestion, I installed numpy 1.23.0
, and it worked! I'm creating a PR with a fix in a moment.
Im on the beach right now so I cant test the versions, hopefully updating numpy to this version wont create compatility problems with torch or something, if it does ill take a look in a few days. I'm glad you found the repo useful! Ill approve the pr.
I just checked - I have some other issues:
Dataset number of classes: 27
Classes are: ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 'a' 'c' 'd' 'e' 'g' 'h' 'k' 'n'
'o' 'p' 'q' 's' 'u' 'v' 'x' 'y' 'z']
Error executing job with overrides: []
Traceback (most recent call last):
File "/Users/maxdonchenko/pytorch-ocr/train.py", line 48, in run_training
).to(device)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/nn/modules/module.py", line 927, in to
return self._apply(convert)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/nn/modules/module.py", line 579, in _apply
module._apply(fn)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/nn/modules/module.py", line 579, in _apply
module._apply(fn)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/nn/modules/module.py", line 602, in _apply
param_applied = fn(param)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/nn/modules/module.py", line 925, in convert
return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File "/Users/maxdonchenko/.pyenv/versions/3.10.12/lib/python3.10/site-packages/torch/cuda/__init__.py", line 211, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
also, I checked that CUDA is some NVIDIA thing for pytorch. Just to double-check - can I run the model in this repo on MacOS or it's compatible only with Windows?
the repo should run just fine in any OS. Cuda is the gpu driver for nvidia gpus, pytorch needs to be installed with cuda (Automatic if you already have an nvidia cuda driver), otherwise it installs cpu only version. To check whether you have the driver, run the command
nvidia-smi
it displays info about the gpu, on the top It - shows the cuda driver version. You need to install those drivers for your gpu in any OS, then it should work just fine.
if using cpu (not recommended, training will take forever), then you can change on config file the device to cpu
Got it! Brilliant, thanks for the explanation!
I've tried setting cpu
in the config file but indeed it takes ages. Closing this issue as solved, thank you!
Heyyy there! Thanks for this repo, I'm studying the Pytorch atm and found your repo from the search. I faced some issue during training process, would love the feedback on what might be the cause of it.
I'm using the:
I installed dependencies using
pip install -r requirements.txt
The error I get looks like to be from
cv2
:any ideas on it?