Skip to content

feat: functorch integration #6

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

Merged
merged 26 commits into from
Sep 11, 2022
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
766ca2f
init
vmoens Apr 13, 2022
0635bc9
amend
vmoens Apr 13, 2022
e7ee747
amend
vmoens Apr 13, 2022
b9c0373
amend
vmoens Apr 13, 2022
589de77
feat: resolve conflicts and init func optimizer
Benjamin-eecs Aug 12, 2022
639c4dc
feat: init func optimizer
Benjamin-eecs Aug 12, 2022
4ea3fe5
feat: init func optimizer
Benjamin-eecs Aug 12, 2022
53e9194
feat: init func optimizer
Benjamin-eecs Aug 12, 2022
f0bdbdf
fix: keep the tensor types after update
XuehaiPan Aug 14, 2022
788fd7e
Merge branch 'main' into functorch_functional
XuehaiPan Aug 14, 2022
ced2114
Merge branch 'main' into functorch_functional
Benjamin-eecs Sep 5, 2022
1358386
Merge branch 'main' into functorch_functional
Benjamin-eecs Sep 7, 2022
5b94aab
fix: pass lint
Benjamin-eecs Sep 7, 2022
e2ff85f
Merge branch 'main' into functorch_functional
Benjamin-eecs Sep 9, 2022
d434103
Merge branch 'main' into functorch_functional
Benjamin-eecs Sep 10, 2022
f7c6858
fix: revert nn.Parameter fix
Benjamin-eecs Sep 11, 2022
3d39c30
chore: cleanup
XuehaiPan Sep 11, 2022
402e48e
feat: update `FuncOptimizer`
XuehaiPan Sep 11, 2022
ff4533c
docs: add docs for `FuncOptimizer`
XuehaiPan Sep 11, 2022
e376123
docs(CHANGELOG): update CHANGELOG.md
XuehaiPan Sep 11, 2022
847549b
chore: cleanup
XuehaiPan Sep 11, 2022
f9ab259
chore: cleanup
XuehaiPan Sep 11, 2022
8f8d3ef
chore: cleanup
XuehaiPan Sep 11, 2022
ad71291
chore: handle corner case
XuehaiPan Sep 11, 2022
474dee5
test: add tests for `FuncOptimizer`
XuehaiPan Sep 11, 2022
fa2a38c
chore: add type check
XuehaiPan Sep 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: cleanup
  • Loading branch information
XuehaiPan committed Sep 11, 2022
commit 8f8d3efbd5a39382bf8a057922d7ad36b39b8146
6 changes: 3 additions & 3 deletions torchopt/_src/optimizer/func/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
class FuncOptimizer: # pylint: disable=too-few-public-methods
"""A wrapper class to hold the functional optimizer.

This wrapper makes it easier to maintain the optimizer states. The optimizer states are holden
by the wrapper internally. The wrapper provides a :meth:`step` function to compute the gradients
This wrapper makes it easier to maintain the optimizer states. The optimizer states are held by
the wrapper internally. The wrapper provides a :meth:`step` function to compute the gradients
and update the parameters.

See Also:
Expand Down Expand Up @@ -65,7 +65,7 @@ def step(
params: (tree of torch.Tensor)
An tree of :class:`torch.Tensor`\s. Specifies what tensors should be optimized.
inplace (optional): (default: :data:`None`)
Wether to update the parameters in-place. If :data:`None`, use the default value
Whether to update the parameters in-place. If :data:`None`, use the default value
specified in the constructor.
"""
if self.optim_state is None:
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy