We can pass the training = False argument while calling the pre-trained model when using Keras Functional API as shown in this tutorial.
training = False
How to implement the