Skip to content

Commit

Permalink
[tools/onert_train] Print trainable ops (#13180)
Browse files Browse the repository at this point in the history
This PR make onert_train prints trainable_ops as log.

ONE-DCO-1.0-Signed-off-by: SeungHui Youn <[email protected]>
  • Loading branch information
zetwhite authored Jun 13, 2024
1 parent 46971a0 commit 1f33982
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/tools/onert_train/src/nnfw_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ std::ostream &operator<<(std::ostream &os, const nnfw_train_info &info)
os << "- batch_size = " << info.batch_size << "\n";
os << "- loss_info = " << info.loss_info << "\n";
os << "- optimizer = " << info.opt << "\n";
os << "- trainalbe_ops = [";
auto const size = info.trainble_ops_size;
if (size > 0)
{
for (int i = 0; i < size - 1; ++i)
os << info.trainble_ops_idx[i] << ", ";
os << info.trainble_ops_idx[size - 1];
}
os << "]\n";

return os;
}

Expand Down

0 comments on commit 1f33982

Please sign in to comment.