-
-
Notifications
You must be signed in to change notification settings - Fork 666
Edit LRFinder to have more than one parameter #2704
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
Changes from 14 commits
ad2d08b
3331237
02c6e3b
2ebce57
479217d
e61e375
46425a4
e6b492c
f7739cd
b5e7d6c
7810a99
f35784c
e33c8e3
307d4fd
1b649ce
4e62716
d15824b
b5c570a
d083525
64f8df2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -275,6 +275,18 @@ def test_lr_policy(lr_finder, to_save, dummy_engine, dataloader): | |
| assert all([lr[i - 1] < lr[i] for i in range(1, len(lr))]) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("step_mode", ["exp", "linear"]) | ||
| def test_multi_opt(lr_finder, dummy_engine_mulitple_param_groups, to_save_mulitple_param_groups, dataloader, step_mode): | ||
| start_lr = [0.1, 0.1, 0.01] | ||
| end_lr = [1.0, 1.0, 1.0] | ||
| dummy_engine = dummy_engine_mulitple_param_groups | ||
|
||
| to_save = to_save_mulitple_param_groups | ||
| with lr_finder.attach(dummy_engine, to_save, start_lr=start_lr, end_lr=end_lr, step_mode=step_mode) as trainer: | ||
| trainer.run(dataloader) | ||
| groups_lrs = lr_finder.get_results()["lr"] | ||
| assert [all([group_lrs[i - 1] < group_lrs[i] for i in range(1, len(group_lrs))]) for group_lrs in groups_lrs] | ||
|
|
||
|
|
||
| def assert_output_sizes(lr_finder, dummy_engine): | ||
| iteration = dummy_engine.state.iteration | ||
| lr_finder_results = lr_finder.get_results() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.