Skip to content

Commit

Permalink
[tools/onert_train] Change variable name (#11393)
Browse files Browse the repository at this point in the history
This commit changes the variable name from num_sample to num_step.

ONE-DCO-1.0-Signed-off-by: Jiyoung Yun <[email protected]>
  • Loading branch information
jyoungyun authored Aug 30, 2023
1 parent 17f895c commit 2cb3063
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/tools/onert_train/src/onert_train.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ int main(const int argc, char **argv)
Measure measure;
std::vector<float> losses(num_expecteds);
phases.run("EXECUTE", [&](const benchmark::Phase &, uint32_t) {
const int num_sample = data_length / tri.batch_size;
const int num_step = data_length / tri.batch_size;
const int num_epoch = args.getEpoch();
measure.set(num_epoch, num_sample);
measure.set(num_epoch, num_step);
for (uint32_t epoch = 0; epoch < num_epoch; ++epoch)
{
std::fill(losses.begin(), losses.end(), 0);
for (uint32_t n = 0; n < num_sample; ++n)
for (uint32_t n = 0; n < num_step; ++n)
{
// get batchsize data
if (!generator(n, input_data, expected_data))
Expand Down Expand Up @@ -248,7 +248,7 @@ int main(const int argc, char **argv)
std::cout.precision(4);
for (uint32_t i = 0; i < num_expecteds; ++i)
{
std::cout << "[" << i << "] " << losses[i] / num_sample;
std::cout << "[" << i << "] " << losses[i] / num_step;
}
std::cout /* << "- accuracy: " << accuracy*/ << std::endl;
}
Expand Down

0 comments on commit 2cb3063

Please sign in to comment.