Empty model when using ResNet50 for transfer learning

I am working on transfer learning using ResNet50. I have a code which was working four months before in Google Colab but when I checked it now, it is no longer working. I am not sure whether this is caused by an updates of the packages I am using.

from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten, Activation
from keras.layers import Conv2D, MaxPooling2D
from keras.models import Model
from keras.applications.resnet50 import ResNet50

restnet = ResNet50(include_top=False, weights='imagenet', input_shape=(64,64,3))
output = restnet.layers[-1].output
output = keras.layers.Flatten()(output)
restnet = Model(restnet.input,output)
restnet.summary()

When I am running the code now, the model is empty

Layer (type)                    Output Shape         Param #     Connected to                     
==================================================================================================
Total params: 23,587,712
Trainable params: 23,534,592
Non-trainable params: 53,120

Any idea what I can do to resolve this?

Topic inceptionresnetv2 transfer-learning keras

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.