tensorflow / benchmarks

A benchmark framework for Tensorflow
Apache License 2.0
1.14k stars 632 forks source link

Add benchmark runtime timestamp #405

Closed Young768 closed 5 years ago

Young768 commented 5 years ago

Hi all, currently when I run the benchmark, I obtain these results:

Step Img/sec total_loss 1 images/sec: 11.6 +/- 0.0 (jitter = 0.0) 10.401 10 images/sec: 15.7 +/- 0.8 (jitter = 0.1) 1.652 20 images/sec: 16.0 +/- 0.5 (jitter = 0.1) 2.102 30 images/sec: 16.2 +/- 0.4 (jitter = 0.1) 2.808 40 images/sec: 16.2 +/- 0.3 (jitter = 0.1) 1.649 50 images/sec: 16.2 +/- 0.3 (jitter = 0.1) 2.835 60 images/sec: 16.3 +/- 0.3 (jitter = 0.1) 2.504 70 images/sec: 16.3 +/- 0.3 (jitter = 0.1) 3.257 80 images/sec: 16.4 +/- 0.2 (jitter = 0.1) 2.588 90 images/sec: 16.4 +/- 0.2 (jitter = 0.1) 2.221 100 images/sec: 16.5 +/- 0.2 (jitter = 0.1) 3.814

But I want to add the system time into the log, for example, xx.xx.xx 1 images/sec: 11.6 +/- 0.0 (jitter = 0.0) 10.401

so that I can plot their convergence. Anyone can help me figure out how to add the time.time() into the code?

tfboyd commented 5 years ago

I strongly suggest not using this code. I am not sure which model you are using but something similar is likely in the official folder and better supported.

If you want more data turn on tensorboard data with

--summary_verbosity=1
--save_summaries_steps=10

Then you start tensorboard to point at the folder with the event.logs. I forget where they go but I suspect maybe the root of tf_cnn_benchmarks.

See this file for more info: https://github.com/tensorflow/benchmarks/blob/master/scripts/tf_cnn_benchmarks/benchmark_cnn.py