inputs = tf.keras.layers.Input(shape=(32,32,3))
resize = tf.keras.layers.UpSampling2D(size=(7,7))(inputs)
feature_extractor = tf.keras.applications.resnet.ResNet50(input_shape=(224, 224,3),include_top=False,weights='imagenet')(resize)
feature_extractor.summary()
The code above results an error AttributeError: 'KerasTensor' object has no attribute 'summary
.
But if I remove resize parameter from ResNet50() as below, It displays the summary without error. Why ?
tf.keras.applications.resnet.ResNet50(input_shape=(224, 224, 3),
include_top=False,
weights='imagenet')