This is a common question.
I wrote a piece of code in which the tensorflow function is computed to calculate.
I want to print the time taken to execute the code.
At first I used:
import time
start = time.time()
main()
print ("%s" % (time.time() - start_time))
But I read that this is an inaccurate way to measure runtime.
How to accurately measure the runtime of my program.
source
share