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

Cannot find reference '_LRScheduler' in 'lr_scheduler.pyi' #220

Open
pistachio0812 opened this issue Nov 19, 2022 · 0 comments
Open

Cannot find reference '_LRScheduler' in 'lr_scheduler.pyi' #220

pistachio0812 opened this issue Nov 19, 2022 · 0 comments

Comments

@pistachio0812
Copy link

when I want to train my network, i meet a mistake!

WarmupMultiStepLR algorithm can't be used, in ./ssd/solver/lr_scheduler.py

from torch.optim.lr_scheduler import _LRScheduler # have a mistake, maybe version problem

Traceback (most recent call last):
File "train.py", line 128, in
main()
File "train.py", line 119, in main
model = train(cfg, args)
File "train.py", line 38, in train
scheduler = make_lr_scheduler(cfg, optimizer, milestones)
File "F:\ssd-v13\ssd\solver\build.py", line 14, in make_lr_scheduler
return WarmupMultiStepLR(optimizer=optimizer,
File "F:\ssd-v13\ssd\solver\lr_scheduler.py", line 21, in init
super().init(optimizer, last_epoch)
File "D:\anaconda\envs\pytorch-gpu\lib\site-packages\torch\optim\lr_scheduler.py", line 410, in init
self.milestones = Counter(milestones)
File "D:\anaconda\envs\pytorch-gpu\lib\collections_init_.py", line 552, in init
self.update(iterable, **kwds)
File "D:\anaconda\envs\pytorch-gpu\lib\collections_init_.py", line 637, in update
_count_elements(self, iterable)
TypeError: 'int' object is not iterable

how to solve it, thanks

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