Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jiyoung Giuliana Yun <[email protected]>
  • Loading branch information
zetwhite and jyoungyun authored Jan 9, 2024
1 parent c1bbd59 commit 3a49c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/tools/onert_train/src/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ void Args::Initialize(void)
"Loss type\n"
"0: MEAN_SQUARED_ERROR (default)\n"
"1: CATEGORICAL_CROSSENTROPY\n")
("loss_reduction_type", po::value<int>()->default_value(0)->notifier([&] (const auto &v) { _loss_reduction_type = v; }),
("loss_reduction_type", po::value<int>()->default_value(1)->notifier([&] (const auto &v) { _loss_reduction_type = v; }),
"Loss Reduction type\n"
"0: SUM_OVER_BATCH_SIZE(default)\n"
"1: SUM\n")
"1: SUM_OVER_BATCH_SIZE(default)\n"
"2: SUM\n")
("optimizer", po::value<int>()->default_value(0)->notifier([&] (const auto &v) { _optimizer_type = v; }),
"Optimizer type\n"
"0: SGD (default)\n"
Expand Down
4 changes: 2 additions & 2 deletions tests/tools/onert_train/src/onert_train.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ int main(const int argc, char **argv)
auto convertLossReductionType = [](int type) {
switch (type)
{
case 0:
return NNFW_TRAIN_LOSS_REDUCTION_SUM_OVER_BATCH_SIZE;
case 1:
return NNFW_TRAIN_LOSS_REDUCTION_SUM_OVER_BATCH_SIZE;
case 2:
return NNFW_TRAIN_LOSS_REDUCTION_SUM;
default:
std::cerr << "E: not supported loss reduction type" << std::endl;
Expand Down

0 comments on commit 3a49c27

Please sign in to comment.