The Wayback Machine - https://web.archive.org/web/20200911094528/https://github.com/skorch-dev/skorch/issues/291
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

Print param groups after initialization #291

Open
ottonemo opened this issue Jul 19, 2018 · 3 comments
Open

Print param groups after initialization #291

ottonemo opened this issue Jul 19, 2018 · 3 comments

Comments

@ottonemo
Copy link
Member

@ottonemo ottonemo commented Jul 19, 2018

We should be verbose about the param groups that are added after initialization (since we support wildcards and it may be intransparent which param groups are created from that).

For example:

>>> net = Net(optimizer__param_groups=[('dense*', {'lr': 0.03})])
Initializing module!
Setting param group {'lr': 0.03} for dense0.weight, dense0.bias, dense1.weight, dense1.bias.
@thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Aug 9, 2018

I can see two ways to implement this feature:

  1. Use a callback with a sink parameter that prints the param group during on_train_begin.
  2. Print the param group in NeutralNet.initialize_optimizer when verbose is truthy.

What do you think?

@benjamin-work
Copy link
Contributor

@benjamin-work benjamin-work commented Aug 16, 2018

@ottonemo do you have an opinion on that?

@ottonemo
Copy link
Member Author

@ottonemo ottonemo commented Dec 12, 2018

Since the introduction of virtual parameters we have dedicated setter methods for these parameters. This means that we have two places where this message may be relevant:

  1. during initialization from Net kwargs
  2. when setting using set_params(optimizer__0__lr=0.03)
    There should probably a utility function to print this message (of course we could think about a special callback that gets triggered when parameters are set but I don't think this is particularly helpful).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.