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

Error in train.py #147

Open
Daisytmzkae opened this issue Mar 24, 2023 · 1 comment
Open

Error in train.py #147

Daisytmzkae opened this issue Mar 24, 2023 · 1 comment

Comments

@Daisytmzkae
Copy link

C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda\amp\grad_scaler.py:118: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.
warnings.warn("torch.cuda.amp.GradScaler is enabled, but CUDA is not available. Disabling.")
0%| | 0/9 [01:03<?, ?it/s]
Traceback (most recent call last):
File "c:\Users\hp\VSCode projcts\trainunet.py", line 143, in
main()
File "c:\Users\hp\VSCode projcts\trainunet.py", line 120, in main
train_fn(train_loader, model,optimizer,loss_fn, scaler)
File "c:\Users\hp\VSCode projcts\trainunet.py", line 39, in train_fn
with torch.cuda.amp.autocast_mode():
TypeError: 'module' object is not callable

@AlinawazHusain
Copy link

@Daisytmzkae it seems like CUDA is not available in your device . you should train on GPU for this function not CPU

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

2 participants