Skip to content

Commit

Permalink
[tools/onert_train] Support checkpoint loader
Browse files Browse the repository at this point in the history
ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
  • Loading branch information
jyoungyun committed Aug 9, 2024
1 parent 22230e9 commit bbc757d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/tools/onert_train/src/onert_train.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,12 @@ int main(const int argc, char **argv)
// prepare execution

// TODO When nnfw_{prepare|run} are failed, can't catch the time
measure.run(PhaseType::PREPARE, [&]() { NNPR_ENSURE_STATUS(nnfw_train_prepare(session)); });
measure.run(PhaseType::PREPARE, [&]() {
NNPR_ENSURE_STATUS(nnfw_train_prepare(session));

if (auto name = args.getCheckpointFilename(); name != "")
NNPR_ENSURE_STATUS(nnfw_train_import_checkpoint(session, name.c_str()));
});

// prepare input and expected tensor info lists
std::vector<nnfw_tensorinfo> input_infos;
Expand Down

0 comments on commit bbc757d

Please sign in to comment.