Skip to content

Remove explicit descriptor where not needed #9046

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
Remove explicit descriptor where not needed (#9046)
Summary:

we only need this for constructors with one param

Reviewed By: JacobSzwejbka

Differential Revision: D70793102
  • Loading branch information
harishs88ss authored and facebook-github-bot committed Mar 7, 2025
commit 162a0b9b824167a4d91d1dc20bbd4677af7a25a3
7 changes: 2 additions & 5 deletions extension/training/optimizer/sgd.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,14 @@ class ET_EXPERIMENTAL SGDParamGroup {
*/
class ET_EXPERIMENTAL SGD {
public:
explicit SGD(
const std::vector<SGDParamGroup>& param_groups,
SGDOptions defaults)
SGD(const std::vector<SGDParamGroup>& param_groups, SGDOptions defaults)
: defaults_(std::make_unique<SGDOptions>(defaults)) {
for (const auto& param_group : param_groups) {
add_param_group(param_group);
}
}

explicit SGD(
const std::map<executorch::aten::string_view, executorch::aten::Tensor>&
SGD(const std::map<executorch::aten::string_view, executorch::aten::Tensor>&
named_parameters,
SGDOptions defaults)
: SGD({SGDParamGroup(named_parameters)}, defaults) {}
Expand Down
Loading