Skip to content

Commit

Permalink
[onert] Update TrainingInfo::isValid() condition (Samsung#12360)
Browse files Browse the repository at this point in the history
This PR update TrainingInfo::isValid() condtion to check learning_rate has positive value.

ONE-DCO-1.0-Signed-off-by: SeungHui Youn <[email protected]>
  • Loading branch information
zetwhite authored Dec 26, 2023
1 parent 0d3c932 commit 4d423d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/onert/core/src/ir/train/TrainingInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bool TrainingInfo::isValid() const
if (_optimizer_info.optim_code == onert::ir::train::OptimizerCode::Invalid)
return false;

if (_optimizer_info.learning_rate == 0.0f)
if (_optimizer_info.learning_rate <= 0.0f)
return false;

if (_loss_info.loss_code == onert::ir::train::LossCode::Invalid)
Expand Down

0 comments on commit 4d423d1

Please sign in to comment.