Skip to content
Snippets Groups Projects
Unverified Commit dba1c844 authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!3187 Add per_step_time for resnet50 benchmark

Merge pull request !3187 from VectorSL/master
parents 5061b090 576963a6
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,8 @@ class MyTimeMonitor(Callback): ...@@ -66,7 +66,8 @@ class MyTimeMonitor(Callback):
fps = self.batch_size / step_mseconds * 1000 * self.size fps = self.batch_size / step_mseconds * 1000 * self.size
print("epoch: [%s/%s] step: [%s/%s], loss is %s" % (cur_epoch_num, total_epochs,\ print("epoch: [%s/%s] step: [%s/%s], loss is %s" % (cur_epoch_num, total_epochs,\
cur_step_in_epoch, self.data_size, loss),\ cur_step_in_epoch, self.data_size, loss),\
"Epoch time: {:5.3f} ms, fps: {:d} img/sec.".format(step_mseconds, int(fps)), flush=True) "Epoch time: {:5.3f} ms, per_step_time: {:.2f} ms, fps: {:d} img/sec.".format(
step_mseconds, step_mseconds / self.size, int(fps)), flush=True)
def create_dataset(dataset_path, do_train, repeat_num=1, batch_size=32, target="GPU", dtype="fp16", def create_dataset(dataset_path, do_train, repeat_num=1, batch_size=32, target="GPU", dtype="fp16",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment