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

TypeError: scheduler.func is expected to be subclass of _LRScheduler but got <class 'type'> #72

Open
fzp16 opened this issue Jan 23, 2024 · 0 comments

Comments

@fzp16
Copy link

fzp16 commented Jan 23, 2024

when i added cifar-10 datasets to the ~/.torch/data. then i run the cifar.py ,it remind me this error:

D:\Installation\ANACONDA\envs\senet\python.exe E:\study\AI_acc\senet.pytorch-master\cifar.py
Files already downloaded and verified
Files already downloaded and verified
0%| | 0/200 [00:00<?, ?it/s]Traceback (most recent call last):
File "E:\study\AI_acc\senet.pytorch-master\cifar.py", line 38, in
main()
File "E:\study\AI_acc\senet.pytorch-master\cifar.py", line 22, in main
with Trainer(model, optimizer, F.cross_entropy, scheduler=scheduler, callbacks=_callbacks) as trainer:
File "D:\Installation\ANACONDA\envs\senet\lib\site-packages\homura\trainers.py", line 519, in init
super(SupervisedTrainer, self).init(model, optimizer, loss_f, callbacks=callbacks, scheduler=scheduler,
File "D:\Installation\ANACONDA\envs\senet\lib\site-packages\homura\trainers.py", line 122, in init
self.set_scheduler()
File "D:\Installation\ANACONDA\envs\senet\lib\site-packages\homura\trainers.py", line 454, in set_scheduler
raise TypeError(f"scheduler.func is expected to be subclass of _LRScheduler"
TypeError: scheduler.func is expected to be subclass of _LRScheduler but got <class 'type'>
0%| | 0/200 [00:00<?, ?it/s]

Process finished with exit code 1

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

1 participant