Skip to content

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

@pistachio0812

Description

@pistachio0812

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions