Skip to content

Commit

Permalink
[tools/onert_train] Add *_UNDEF to the dump util
Browse files Browse the repository at this point in the history
This PR adds *_UNDEF enum to the ostream print utility.

ONE-DCO-1.0-Signed-off-by: SeungHui Youn <[email protected]>
  • Loading branch information
zetwhite committed Jan 8, 2024
1 parent f165eaf commit eb38401
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/tools/onert_train/src/nnfw_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ std::ostream &operator<<(std::ostream &os, const NNFW_TRAIN_OPTIMIZER &opt)
{
switch (opt)
{
case NNFW_TRAIN_OPTIMIZER_UNDEFINED:
os << "undefined";
break;
case NNFW_TRAIN_OPTIMIZER_ADAM:
os << "adam";
break;
Expand All @@ -70,6 +73,9 @@ std::ostream &operator<<(std::ostream &os, const NNFW_TRAIN_LOSS &loss)
{
switch (loss)
{
case NNFW_TRAIN_LOSS_UNDEFINED:
os << "undefined";
break;
case NNFW_TRAIN_LOSS_MEAN_SQUARED_ERROR:
os << "mean squared error";
break;
Expand All @@ -87,6 +93,9 @@ std::ostream &operator<<(std::ostream &os, const NNFW_TRAIN_LOSS_REDUCTION &loss
{
switch (loss_reduction)
{
case NNFW_TRAIN_LOSS_REDUCTION_UNDEFINED:
os << "undefined";
break;
case NNFW_TRAIN_LOSS_REDUCTION_AUTO:
os << "use automatic reduction type";
break;
Expand Down

0 comments on commit eb38401

Please sign in to comment.