moskomule / homura

homura is a library for fast prototyping DL research
Apache License 2.0
107 stars 23 forks source link

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

Open fzp16 opened 10 months ago

fzp16 commented 10 months ago

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

littleeboy commented 2 months ago

I have the same question