Skip to content

Commit

Permalink
improve optimizer serializing test: set change of lr to 0.01
Browse files Browse the repository at this point in the history
  • Loading branch information
daizhirui committed May 6, 2024
1 parent 1f59509 commit ca188ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/cpp/api/serialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void test_serialize_optimizer(
const double lr = param_group.options().get_lr();
// change the learning rate, which will be overwritten by the loading
// otherwise, test cannot check if options are saved and loaded correctly
param_group.options().set_lr(lr + 1);
param_group.options().set_lr(lr + 0.01);
}

auto x = torch::ones({10, 5});
Expand Down

0 comments on commit ca188ac

Please sign in to comment.