I have a trained model in saved model format. I made this model non-trainable by setting model.trainable=False and verified in the model.summary() that all parameters are non-trainable. This helps to reduce the model size on disk and faster load times
I have saved this non-trainable model to disk, then I am loading non-trainable model and using it for inference purpose, there is no change in accuracy of model.
When I time using time.time(), inference from the non-trainable model vs trainable model(with trainable parameters), on the exact same dataset, the original trainable model seems to perform faster than non-trainable model
Can anyone shed some light as to why the non-trainable model performs slower than trainable model. I am using tensorflow 2.4.1 python3.7