I have some questions about get learning time.

Most people think getting learning time like that...

import time
import tensorflow as tf
from tensorflow import keras
... #passing detailed code
start_time = time.time() #check start time
model.fit(x_train, y_train, epochs=10) #do learning
end_time = time.time() #check end time

training_time = end_time - start_time #get learning time

but, I had an inexplicable doubt about that code.

When we do model.fit(), then It load libraries such as CUDA before learning. so, I think training_time includes loading libraries time, so that time is not pure learning time.

So, If this doubt is correct, then how can we get pure learning time exclude loading library time?

Thank you.



You must log in to answer this question.

Browse other questions tagged .