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

resume training fails with single learning rate #17

Open
weinman opened this issue Jul 16, 2021 · 0 comments
Open

resume training fails with single learning rate #17

weinman opened this issue Jul 16, 2021 · 0 comments

Comments

@weinman
Copy link

weinman commented Jul 16, 2021

Quick report from the field on commit 61aca54 to branch update_21014 (which addressed #15 and #16).

Because decolle.utils.MultiOpt uses the semantically accurate, but non-conforming method name load_state_dicts, resuming model training fails with train_lenet_decolle.py when trying to resume from a single learning-rate model whose opt is a torch .optim.Adamax object (which has only a load_state_dict method), the failure happening here.

I'd perhaps suggest simply renaming the MultiOpt method to the singular load_state_dict to avoid messiness elsewhere about checking for which attribute or object class is present.

I'm happy to submit a PR along those lines if you like; it looks like you pull the public facing version of this repo from elsewhere, so I'd understand if that complicates your git flow for so simple a change.

Here's the error trace:

Traceback (most recent call last):
File "train_lenet_decolle.py", line 111, in
starting_epoch = load_model_from_checkpoint(checkpoint_dir, net, opt)
File "[root]/conda/lib/python3.7/site-packages/decolle-0.1-py3.7.egg/decolle/utils.py", line 166, in load_model_from_checkpoint
AttributeError: 'Adamax' object has no attribute 'load_state_dicts'

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