I would like to restore the Resnet50V2 model from checkpoint but do not want the last layer to be restored in new model .I am not understanding how to do that? The pseudo code is as follows:
I trained the first model as
Model= ResNet50v2 ()
Cnn_model= Sequential([
Average pooling layer,
Dense (2048),
Dense (2048).
Dense (10) ])
Now I want to use the checkpoint of above model with the same architecture but do not want to add Dense(10) layer .