Activation_model

Hello

In the Ungraded lab of week 3(course 1), there is a code line :
activation_model = tf.keras.models.Model(inputs = model.input, outputs = layer_outputs)

i don’t get it. because here we are defining a new model. even we don’t use layer objects from the previous trained model(which include the parameters).

So I believe this new model needs to be trained again! I mean how this model access the trained parameters?

I hope i could ask my question.

Regards

The ungraded lab you’re referring to is from course 1 week 3 (C1_W3_Lab_1_improving_accuracy_using_convolutions.ipynb)
Please fix your post so that other learners don’t get confused.
Here’s the community user guide to get started.

Since we are interested in capturing just the outputs for visualization and not interested in tuning the layers, there’s no need to train activation_model.

Thanks balaji
Sorry for the mistake
you mean the activation model has never been trained before?
But how can we predict a model before training it?
Regards

model has been trained. We are using activation_model to capture outputs of interest from model and so doesn’t have to be compiled / trained.