hellochick / ICNet-tensorflow

TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
405 stars 153 forks source link

Test Speed #72

Closed InstantWindy closed 5 years ago

InstantWindy commented 6 years ago

I have a question,I don't know how to calculate the speed,how did you calculate the speed? thank you !

hellochick commented 6 years ago

Hey @InstantWindy,

To simplify the testing procedure, you can using time library, and following is the sample code:

start_time = time.time()

# The part which you want to calculate
output = sess.run(...)

end_time = time.time()

elapse_time = end_time - start_time

Or if you want to know the details of the execution time, you can use tf.profiler which provided in tf 1.8.