Transfer Learning — Part — 7.1!! Implementing Densenet in Keras
In Part 7.0 of the Transfer Learning series we have discussed about Densenet pre-trained model in depth so in this series we will implement the above mentioned pre-trained model in Keras. We will be implementing the pre-trained Densenet model in 4 ways which we will discuss further in this article. For setting- up the Colab notebook it will be advisable to go through the below mentioned article of Transfer Learning Series. In Part 2 of the Transfer Learning series we have discussed how we can set-up our environment below is the link for the article.
It is also advisable to go through the article of Densenet before reading this article which is mentioned below:
1. Implementing Densenet Pre-trained model
In this section we will see how we can implement DenseNet model in keras to have a foundation to start our real implementation .
1.1. Image which we will predict on
We will use the image of the coffee mug to predict the labels with the Densenet architectures. Below i have demonstrated the code how to load and preprocess the image.
import tensorflow as tf #Line 1
Line 1: The above snippet is used to import the TensorFlow library which we use use to implement Keras.
image = tf.keras.preprocessing.image.load_img(link_of_image, target_size=(224, 224)) #Line 2
image = tf.keras.preprocessing.image.img_to_array(image) #Line 3
image = image.reshape((1, image.shape[0], image.shape[1], image.shape[2])) #Line 4
image = tf.keras.applications.DenseNet121.preprocess_input(image) #Line 5
Line 2: This snippet loads the images with size of (224,224).
Line 3: This snippet converts the image into array for further pre-processing.
Line 4: This snippet converts the image size into (batch_Size,height,width, channel) from (height,width, channel) i.e. (1,224,224,3) from (224,224,3).
Line 5: This snippet use to pre process the image according to the Densenet architecture.
1.2. Densenet Implementation
Here we will use Densenet network to predict on the coffee mug image code is demonstrated below.
Densenet_MODEL= tf.keras.applications.Densenet121(include_top=True, weights='imagenet', input_tensor=None,input_shape=(224,224, 3), pooling='max', classes=1000,classifier_activation='softmax') #Line 1print(MobileNetV2_MODEL.summary()) #Line 2
Line 1: This snippets is used to create an object for the Densenet121 model by including all its layer, specifying input shape to — input_shape=(224, 224, 3), pooling is set to max pooling pooling=’max’, since no. of classes in 1000 in ImageNet we also have set the classes to 1000 here classes=1000 and classifier_ layer activation to softmax i.e. classifier_activation=’softmax’.
Line 2: This snippets shows the summary of the network as shown below:
Model: "densenet121"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_1 (InputLayer) [(None, 224, 224, 3 0 []
)]
zero_padding2d (ZeroPadding2D) (None, 230, 230, 3) 0 ['input_1[0][0]']
conv1/conv (Conv2D) (None, 112, 112, 64 9408 ['zero_padding2d[0][0]']
)
conv1/bn (BatchNormalization) (None, 112, 112, 64 256 ['conv1/conv[0][0]']
)
conv1/relu (Activation) (None, 112, 112, 64 0 ['conv1/bn[0][0]']
)
zero_padding2d_1 (ZeroPadding2 (None, 114, 114, 64 0 ['conv1/relu[0][0]']
D) )
pool1 (MaxPooling2D) (None, 56, 56, 64) 0 ['zero_padding2d_1[0][0]']
conv2_block1_0_bn (BatchNormal (None, 56, 56, 64) 256 ['pool1[0][0]']
ization)
conv2_block1_0_relu (Activatio (None, 56, 56, 64) 0 ['conv2_block1_0_bn[0][0]']
n)
conv2_block1_1_conv (Conv2D) (None, 56, 56, 128) 8192 ['conv2_block1_0_relu[0][0]']
conv2_block1_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block1_1_conv[0][0]']
ization)
conv2_block1_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block1_1_bn[0][0]']
n)
conv2_block1_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block1_1_relu[0][0]']
conv2_block1_concat (Concatena (None, 56, 56, 96) 0 ['pool1[0][0]',
te) 'conv2_block1_2_conv[0][0]']
conv2_block2_0_bn (BatchNormal (None, 56, 56, 96) 384 ['conv2_block1_concat[0][0]']
ization)
conv2_block2_0_relu (Activatio (None, 56, 56, 96) 0 ['conv2_block2_0_bn[0][0]']
n)
conv2_block2_1_conv (Conv2D) (None, 56, 56, 128) 12288 ['conv2_block2_0_relu[0][0]']
conv2_block2_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block2_1_conv[0][0]']
ization)
conv2_block2_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block2_1_bn[0][0]']
n)
conv2_block2_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block2_1_relu[0][0]']
conv2_block2_concat (Concatena (None, 56, 56, 128) 0 ['conv2_block1_concat[0][0]',
te) 'conv2_block2_2_conv[0][0]']
conv2_block3_0_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block2_concat[0][0]']
ization)
conv2_block3_0_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block3_0_bn[0][0]']
n)
conv2_block3_1_conv (Conv2D) (None, 56, 56, 128) 16384 ['conv2_block3_0_relu[0][0]']
conv2_block3_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block3_1_conv[0][0]']
ization)
conv2_block3_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block3_1_bn[0][0]']
n)
conv2_block3_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block3_1_relu[0][0]']
conv2_block3_concat (Concatena (None, 56, 56, 160) 0 ['conv2_block2_concat[0][0]',
te) 'conv2_block3_2_conv[0][0]']
conv2_block4_0_bn (BatchNormal (None, 56, 56, 160) 640 ['conv2_block3_concat[0][0]']
ization)
conv2_block4_0_relu (Activatio (None, 56, 56, 160) 0 ['conv2_block4_0_bn[0][0]']
n)
conv2_block4_1_conv (Conv2D) (None, 56, 56, 128) 20480 ['conv2_block4_0_relu[0][0]']
conv2_block4_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block4_1_conv[0][0]']
ization)
conv2_block4_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block4_1_bn[0][0]']
n)
conv2_block4_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block4_1_relu[0][0]']
conv2_block4_concat (Concatena (None, 56, 56, 192) 0 ['conv2_block3_concat[0][0]',
te) 'conv2_block4_2_conv[0][0]']
conv2_block5_0_bn (BatchNormal (None, 56, 56, 192) 768 ['conv2_block4_concat[0][0]']
ization)
conv2_block5_0_relu (Activatio (None, 56, 56, 192) 0 ['conv2_block5_0_bn[0][0]']
n)
conv2_block5_1_conv (Conv2D) (None, 56, 56, 128) 24576 ['conv2_block5_0_relu[0][0]']
conv2_block5_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block5_1_conv[0][0]']
ization)
conv2_block5_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block5_1_bn[0][0]']
n)
conv2_block5_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block5_1_relu[0][0]']
conv2_block5_concat (Concatena (None, 56, 56, 224) 0 ['conv2_block4_concat[0][0]',
te) 'conv2_block5_2_conv[0][0]']
conv2_block6_0_bn (BatchNormal (None, 56, 56, 224) 896 ['conv2_block5_concat[0][0]']
ization)
conv2_block6_0_relu (Activatio (None, 56, 56, 224) 0 ['conv2_block6_0_bn[0][0]']
n)
conv2_block6_1_conv (Conv2D) (None, 56, 56, 128) 28672 ['conv2_block6_0_relu[0][0]']
conv2_block6_1_bn (BatchNormal (None, 56, 56, 128) 512 ['conv2_block6_1_conv[0][0]']
ization)
conv2_block6_1_relu (Activatio (None, 56, 56, 128) 0 ['conv2_block6_1_bn[0][0]']
n)
conv2_block6_2_conv (Conv2D) (None, 56, 56, 32) 36864 ['conv2_block6_1_relu[0][0]']
conv2_block6_concat (Concatena (None, 56, 56, 256) 0 ['conv2_block5_concat[0][0]',
te) 'conv2_block6_2_conv[0][0]']
pool2_bn (BatchNormalization) (None, 56, 56, 256) 1024 ['conv2_block6_concat[0][0]']
pool2_relu (Activation) (None, 56, 56, 256) 0 ['pool2_bn[0][0]']
pool2_conv (Conv2D) (None, 56, 56, 128) 32768 ['pool2_relu[0][0]']
pool2_pool (AveragePooling2D) (None, 28, 28, 128) 0 ['pool2_conv[0][0]']
conv3_block1_0_bn (BatchNormal (None, 28, 28, 128) 512 ['pool2_pool[0][0]']
ization)
conv3_block1_0_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block1_0_bn[0][0]']
n)
conv3_block1_1_conv (Conv2D) (None, 28, 28, 128) 16384 ['conv3_block1_0_relu[0][0]']
conv3_block1_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block1_1_conv[0][0]']
ization)
conv3_block1_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block1_1_bn[0][0]']
n)
conv3_block1_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block1_1_relu[0][0]']
conv3_block1_concat (Concatena (None, 28, 28, 160) 0 ['pool2_pool[0][0]',
te) 'conv3_block1_2_conv[0][0]']
conv3_block2_0_bn (BatchNormal (None, 28, 28, 160) 640 ['conv3_block1_concat[0][0]']
ization)
conv3_block2_0_relu (Activatio (None, 28, 28, 160) 0 ['conv3_block2_0_bn[0][0]']
n)
conv3_block2_1_conv (Conv2D) (None, 28, 28, 128) 20480 ['conv3_block2_0_relu[0][0]']
conv3_block2_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block2_1_conv[0][0]']
ization)
conv3_block2_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block2_1_bn[0][0]']
n)
conv3_block2_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block2_1_relu[0][0]']
conv3_block2_concat (Concatena (None, 28, 28, 192) 0 ['conv3_block1_concat[0][0]',
te) 'conv3_block2_2_conv[0][0]']
conv3_block3_0_bn (BatchNormal (None, 28, 28, 192) 768 ['conv3_block2_concat[0][0]']
ization)
conv3_block3_0_relu (Activatio (None, 28, 28, 192) 0 ['conv3_block3_0_bn[0][0]']
n)
conv3_block3_1_conv (Conv2D) (None, 28, 28, 128) 24576 ['conv3_block3_0_relu[0][0]']
conv3_block3_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block3_1_conv[0][0]']
ization)
conv3_block3_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block3_1_bn[0][0]']
n)
conv3_block3_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block3_1_relu[0][0]']
conv3_block3_concat (Concatena (None, 28, 28, 224) 0 ['conv3_block2_concat[0][0]',
te) 'conv3_block3_2_conv[0][0]']
conv3_block4_0_bn (BatchNormal (None, 28, 28, 224) 896 ['conv3_block3_concat[0][0]']
ization)
conv3_block4_0_relu (Activatio (None, 28, 28, 224) 0 ['conv3_block4_0_bn[0][0]']
n)
conv3_block4_1_conv (Conv2D) (None, 28, 28, 128) 28672 ['conv3_block4_0_relu[0][0]']
conv3_block4_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block4_1_conv[0][0]']
ization)
conv3_block4_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block4_1_bn[0][0]']
n)
conv3_block4_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block4_1_relu[0][0]']
conv3_block4_concat (Concatena (None, 28, 28, 256) 0 ['conv3_block3_concat[0][0]',
te) 'conv3_block4_2_conv[0][0]']
conv3_block5_0_bn (BatchNormal (None, 28, 28, 256) 1024 ['conv3_block4_concat[0][0]']
ization)
conv3_block5_0_relu (Activatio (None, 28, 28, 256) 0 ['conv3_block5_0_bn[0][0]']
n)
conv3_block5_1_conv (Conv2D) (None, 28, 28, 128) 32768 ['conv3_block5_0_relu[0][0]']
conv3_block5_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block5_1_conv[0][0]']
ization)
conv3_block5_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block5_1_bn[0][0]']
n)
conv3_block5_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block5_1_relu[0][0]']
conv3_block5_concat (Concatena (None, 28, 28, 288) 0 ['conv3_block4_concat[0][0]',
te) 'conv3_block5_2_conv[0][0]']
conv3_block6_0_bn (BatchNormal (None, 28, 28, 288) 1152 ['conv3_block5_concat[0][0]']
ization)
conv3_block6_0_relu (Activatio (None, 28, 28, 288) 0 ['conv3_block6_0_bn[0][0]']
n)
conv3_block6_1_conv (Conv2D) (None, 28, 28, 128) 36864 ['conv3_block6_0_relu[0][0]']
conv3_block6_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block6_1_conv[0][0]']
ization)
conv3_block6_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block6_1_bn[0][0]']
n)
conv3_block6_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block6_1_relu[0][0]']
conv3_block6_concat (Concatena (None, 28, 28, 320) 0 ['conv3_block5_concat[0][0]',
te) 'conv3_block6_2_conv[0][0]']
conv3_block7_0_bn (BatchNormal (None, 28, 28, 320) 1280 ['conv3_block6_concat[0][0]']
ization)
conv3_block7_0_relu (Activatio (None, 28, 28, 320) 0 ['conv3_block7_0_bn[0][0]']
n)
conv3_block7_1_conv (Conv2D) (None, 28, 28, 128) 40960 ['conv3_block7_0_relu[0][0]']
conv3_block7_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block7_1_conv[0][0]']
ization)
conv3_block7_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block7_1_bn[0][0]']
n)
conv3_block7_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block7_1_relu[0][0]']
conv3_block7_concat (Concatena (None, 28, 28, 352) 0 ['conv3_block6_concat[0][0]',
te) 'conv3_block7_2_conv[0][0]']
conv3_block8_0_bn (BatchNormal (None, 28, 28, 352) 1408 ['conv3_block7_concat[0][0]']
ization)
conv3_block8_0_relu (Activatio (None, 28, 28, 352) 0 ['conv3_block8_0_bn[0][0]']
n)
conv3_block8_1_conv (Conv2D) (None, 28, 28, 128) 45056 ['conv3_block8_0_relu[0][0]']
conv3_block8_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block8_1_conv[0][0]']
ization)
conv3_block8_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block8_1_bn[0][0]']
n)
conv3_block8_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block8_1_relu[0][0]']
conv3_block8_concat (Concatena (None, 28, 28, 384) 0 ['conv3_block7_concat[0][0]',
te) 'conv3_block8_2_conv[0][0]']
conv3_block9_0_bn (BatchNormal (None, 28, 28, 384) 1536 ['conv3_block8_concat[0][0]']
ization)
conv3_block9_0_relu (Activatio (None, 28, 28, 384) 0 ['conv3_block9_0_bn[0][0]']
n)
conv3_block9_1_conv (Conv2D) (None, 28, 28, 128) 49152 ['conv3_block9_0_relu[0][0]']
conv3_block9_1_bn (BatchNormal (None, 28, 28, 128) 512 ['conv3_block9_1_conv[0][0]']
ization)
conv3_block9_1_relu (Activatio (None, 28, 28, 128) 0 ['conv3_block9_1_bn[0][0]']
n)
conv3_block9_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block9_1_relu[0][0]']
conv3_block9_concat (Concatena (None, 28, 28, 416) 0 ['conv3_block8_concat[0][0]',
te) 'conv3_block9_2_conv[0][0]']
conv3_block10_0_bn (BatchNorma (None, 28, 28, 416) 1664 ['conv3_block9_concat[0][0]']
lization)
conv3_block10_0_relu (Activati (None, 28, 28, 416) 0 ['conv3_block10_0_bn[0][0]']
on)
conv3_block10_1_conv (Conv2D) (None, 28, 28, 128) 53248 ['conv3_block10_0_relu[0][0]']
conv3_block10_1_bn (BatchNorma (None, 28, 28, 128) 512 ['conv3_block10_1_conv[0][0]']
lization)
conv3_block10_1_relu (Activati (None, 28, 28, 128) 0 ['conv3_block10_1_bn[0][0]']
on)
conv3_block10_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block10_1_relu[0][0]']
conv3_block10_concat (Concaten (None, 28, 28, 448) 0 ['conv3_block9_concat[0][0]',
ate) 'conv3_block10_2_conv[0][0]']
conv3_block11_0_bn (BatchNorma (None, 28, 28, 448) 1792 ['conv3_block10_concat[0][0]']
lization)
conv3_block11_0_relu (Activati (None, 28, 28, 448) 0 ['conv3_block11_0_bn[0][0]']
on)
conv3_block11_1_conv (Conv2D) (None, 28, 28, 128) 57344 ['conv3_block11_0_relu[0][0]']
conv3_block11_1_bn (BatchNorma (None, 28, 28, 128) 512 ['conv3_block11_1_conv[0][0]']
lization)
conv3_block11_1_relu (Activati (None, 28, 28, 128) 0 ['conv3_block11_1_bn[0][0]']
on)
conv3_block11_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block11_1_relu[0][0]']
conv3_block11_concat (Concaten (None, 28, 28, 480) 0 ['conv3_block10_concat[0][0]',
ate) 'conv3_block11_2_conv[0][0]']
conv3_block12_0_bn (BatchNorma (None, 28, 28, 480) 1920 ['conv3_block11_concat[0][0]']
lization)
conv3_block12_0_relu (Activati (None, 28, 28, 480) 0 ['conv3_block12_0_bn[0][0]']
on)
conv3_block12_1_conv (Conv2D) (None, 28, 28, 128) 61440 ['conv3_block12_0_relu[0][0]']
conv3_block12_1_bn (BatchNorma (None, 28, 28, 128) 512 ['conv3_block12_1_conv[0][0]']
lization)
conv3_block12_1_relu (Activati (None, 28, 28, 128) 0 ['conv3_block12_1_bn[0][0]']
on)
conv3_block12_2_conv (Conv2D) (None, 28, 28, 32) 36864 ['conv3_block12_1_relu[0][0]']
conv3_block12_concat (Concaten (None, 28, 28, 512) 0 ['conv3_block11_concat[0][0]',
ate) 'conv3_block12_2_conv[0][0]']
pool3_bn (BatchNormalization) (None, 28, 28, 512) 2048 ['conv3_block12_concat[0][0]']
pool3_relu (Activation) (None, 28, 28, 512) 0 ['pool3_bn[0][0]']
pool3_conv (Conv2D) (None, 28, 28, 256) 131072 ['pool3_relu[0][0]']
pool3_pool (AveragePooling2D) (None, 14, 14, 256) 0 ['pool3_conv[0][0]']
conv4_block1_0_bn (BatchNormal (None, 14, 14, 256) 1024 ['pool3_pool[0][0]']
ization)
conv4_block1_0_relu (Activatio (None, 14, 14, 256) 0 ['conv4_block1_0_bn[0][0]']
n)
conv4_block1_1_conv (Conv2D) (None, 14, 14, 128) 32768 ['conv4_block1_0_relu[0][0]']
conv4_block1_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block1_1_conv[0][0]']
ization)
conv4_block1_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block1_1_bn[0][0]']
n)
conv4_block1_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block1_1_relu[0][0]']
conv4_block1_concat (Concatena (None, 14, 14, 288) 0 ['pool3_pool[0][0]',
te) 'conv4_block1_2_conv[0][0]']
conv4_block2_0_bn (BatchNormal (None, 14, 14, 288) 1152 ['conv4_block1_concat[0][0]']
ization)
conv4_block2_0_relu (Activatio (None, 14, 14, 288) 0 ['conv4_block2_0_bn[0][0]']
n)
conv4_block2_1_conv (Conv2D) (None, 14, 14, 128) 36864 ['conv4_block2_0_relu[0][0]']
conv4_block2_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block2_1_conv[0][0]']
ization)
conv4_block2_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block2_1_bn[0][0]']
n)
conv4_block2_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block2_1_relu[0][0]']
conv4_block2_concat (Concatena (None, 14, 14, 320) 0 ['conv4_block1_concat[0][0]',
te) 'conv4_block2_2_conv[0][0]']
conv4_block3_0_bn (BatchNormal (None, 14, 14, 320) 1280 ['conv4_block2_concat[0][0]']
ization)
conv4_block3_0_relu (Activatio (None, 14, 14, 320) 0 ['conv4_block3_0_bn[0][0]']
n)
conv4_block3_1_conv (Conv2D) (None, 14, 14, 128) 40960 ['conv4_block3_0_relu[0][0]']
conv4_block3_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block3_1_conv[0][0]']
ization)
conv4_block3_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block3_1_bn[0][0]']
n)
conv4_block3_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block3_1_relu[0][0]']
conv4_block3_concat (Concatena (None, 14, 14, 352) 0 ['conv4_block2_concat[0][0]',
te) 'conv4_block3_2_conv[0][0]']
conv4_block4_0_bn (BatchNormal (None, 14, 14, 352) 1408 ['conv4_block3_concat[0][0]']
ization)
conv4_block4_0_relu (Activatio (None, 14, 14, 352) 0 ['conv4_block4_0_bn[0][0]']
n)
conv4_block4_1_conv (Conv2D) (None, 14, 14, 128) 45056 ['conv4_block4_0_relu[0][0]']
conv4_block4_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block4_1_conv[0][0]']
ization)
conv4_block4_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block4_1_bn[0][0]']
n)
conv4_block4_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block4_1_relu[0][0]']
conv4_block4_concat (Concatena (None, 14, 14, 384) 0 ['conv4_block3_concat[0][0]',
te) 'conv4_block4_2_conv[0][0]']
conv4_block5_0_bn (BatchNormal (None, 14, 14, 384) 1536 ['conv4_block4_concat[0][0]']
ization)
conv4_block5_0_relu (Activatio (None, 14, 14, 384) 0 ['conv4_block5_0_bn[0][0]']
n)
conv4_block5_1_conv (Conv2D) (None, 14, 14, 128) 49152 ['conv4_block5_0_relu[0][0]']
conv4_block5_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block5_1_conv[0][0]']
ization)
conv4_block5_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block5_1_bn[0][0]']
n)
conv4_block5_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block5_1_relu[0][0]']
conv4_block5_concat (Concatena (None, 14, 14, 416) 0 ['conv4_block4_concat[0][0]',
te) 'conv4_block5_2_conv[0][0]']
conv4_block6_0_bn (BatchNormal (None, 14, 14, 416) 1664 ['conv4_block5_concat[0][0]']
ization)
conv4_block6_0_relu (Activatio (None, 14, 14, 416) 0 ['conv4_block6_0_bn[0][0]']
n)
conv4_block6_1_conv (Conv2D) (None, 14, 14, 128) 53248 ['conv4_block6_0_relu[0][0]']
conv4_block6_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block6_1_conv[0][0]']
ization)
conv4_block6_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block6_1_bn[0][0]']
n)
conv4_block6_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block6_1_relu[0][0]']
conv4_block6_concat (Concatena (None, 14, 14, 448) 0 ['conv4_block5_concat[0][0]',
te) 'conv4_block6_2_conv[0][0]']
conv4_block7_0_bn (BatchNormal (None, 14, 14, 448) 1792 ['conv4_block6_concat[0][0]']
ization)
conv4_block7_0_relu (Activatio (None, 14, 14, 448) 0 ['conv4_block7_0_bn[0][0]']
n)
conv4_block7_1_conv (Conv2D) (None, 14, 14, 128) 57344 ['conv4_block7_0_relu[0][0]']
conv4_block7_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block7_1_conv[0][0]']
ization)
conv4_block7_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block7_1_bn[0][0]']
n)
conv4_block7_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block7_1_relu[0][0]']
conv4_block7_concat (Concatena (None, 14, 14, 480) 0 ['conv4_block6_concat[0][0]',
te) 'conv4_block7_2_conv[0][0]']
conv4_block8_0_bn (BatchNormal (None, 14, 14, 480) 1920 ['conv4_block7_concat[0][0]']
ization)
conv4_block8_0_relu (Activatio (None, 14, 14, 480) 0 ['conv4_block8_0_bn[0][0]']
n)
conv4_block8_1_conv (Conv2D) (None, 14, 14, 128) 61440 ['conv4_block8_0_relu[0][0]']
conv4_block8_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block8_1_conv[0][0]']
ization)
conv4_block8_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block8_1_bn[0][0]']
n)
conv4_block8_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block8_1_relu[0][0]']
conv4_block8_concat (Concatena (None, 14, 14, 512) 0 ['conv4_block7_concat[0][0]',
te) 'conv4_block8_2_conv[0][0]']
conv4_block9_0_bn (BatchNormal (None, 14, 14, 512) 2048 ['conv4_block8_concat[0][0]']
ization)
conv4_block9_0_relu (Activatio (None, 14, 14, 512) 0 ['conv4_block9_0_bn[0][0]']
n)
conv4_block9_1_conv (Conv2D) (None, 14, 14, 128) 65536 ['conv4_block9_0_relu[0][0]']
conv4_block9_1_bn (BatchNormal (None, 14, 14, 128) 512 ['conv4_block9_1_conv[0][0]']
ization)
conv4_block9_1_relu (Activatio (None, 14, 14, 128) 0 ['conv4_block9_1_bn[0][0]']
n)
conv4_block9_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block9_1_relu[0][0]']
conv4_block9_concat (Concatena (None, 14, 14, 544) 0 ['conv4_block8_concat[0][0]',
te) 'conv4_block9_2_conv[0][0]']
conv4_block10_0_bn (BatchNorma (None, 14, 14, 544) 2176 ['conv4_block9_concat[0][0]']
lization)
conv4_block10_0_relu (Activati (None, 14, 14, 544) 0 ['conv4_block10_0_bn[0][0]']
on)
conv4_block10_1_conv (Conv2D) (None, 14, 14, 128) 69632 ['conv4_block10_0_relu[0][0]']
conv4_block10_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block10_1_conv[0][0]']
lization)
conv4_block10_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block10_1_bn[0][0]']
on)
conv4_block10_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block10_1_relu[0][0]']
conv4_block10_concat (Concaten (None, 14, 14, 576) 0 ['conv4_block9_concat[0][0]',
ate) 'conv4_block10_2_conv[0][0]']
conv4_block11_0_bn (BatchNorma (None, 14, 14, 576) 2304 ['conv4_block10_concat[0][0]']
lization)
conv4_block11_0_relu (Activati (None, 14, 14, 576) 0 ['conv4_block11_0_bn[0][0]']
on)
conv4_block11_1_conv (Conv2D) (None, 14, 14, 128) 73728 ['conv4_block11_0_relu[0][0]']
conv4_block11_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block11_1_conv[0][0]']
lization)
conv4_block11_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block11_1_bn[0][0]']
on)
conv4_block11_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block11_1_relu[0][0]']
conv4_block11_concat (Concaten (None, 14, 14, 608) 0 ['conv4_block10_concat[0][0]',
ate) 'conv4_block11_2_conv[0][0]']
conv4_block12_0_bn (BatchNorma (None, 14, 14, 608) 2432 ['conv4_block11_concat[0][0]']
lization)
conv4_block12_0_relu (Activati (None, 14, 14, 608) 0 ['conv4_block12_0_bn[0][0]']
on)
conv4_block12_1_conv (Conv2D) (None, 14, 14, 128) 77824 ['conv4_block12_0_relu[0][0]']
conv4_block12_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block12_1_conv[0][0]']
lization)
conv4_block12_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block12_1_bn[0][0]']
on)
conv4_block12_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block12_1_relu[0][0]']
conv4_block12_concat (Concaten (None, 14, 14, 640) 0 ['conv4_block11_concat[0][0]',
ate) 'conv4_block12_2_conv[0][0]']
conv4_block13_0_bn (BatchNorma (None, 14, 14, 640) 2560 ['conv4_block12_concat[0][0]']
lization)
conv4_block13_0_relu (Activati (None, 14, 14, 640) 0 ['conv4_block13_0_bn[0][0]']
on)
conv4_block13_1_conv (Conv2D) (None, 14, 14, 128) 81920 ['conv4_block13_0_relu[0][0]']
conv4_block13_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block13_1_conv[0][0]']
lization)
conv4_block13_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block13_1_bn[0][0]']
on)
conv4_block13_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block13_1_relu[0][0]']
conv4_block13_concat (Concaten (None, 14, 14, 672) 0 ['conv4_block12_concat[0][0]',
ate) 'conv4_block13_2_conv[0][0]']
conv4_block14_0_bn (BatchNorma (None, 14, 14, 672) 2688 ['conv4_block13_concat[0][0]']
lization)
conv4_block14_0_relu (Activati (None, 14, 14, 672) 0 ['conv4_block14_0_bn[0][0]']
on)
conv4_block14_1_conv (Conv2D) (None, 14, 14, 128) 86016 ['conv4_block14_0_relu[0][0]']
conv4_block14_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block14_1_conv[0][0]']
lization)
conv4_block14_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block14_1_bn[0][0]']
on)
conv4_block14_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block14_1_relu[0][0]']
conv4_block14_concat (Concaten (None, 14, 14, 704) 0 ['conv4_block13_concat[0][0]',
ate) 'conv4_block14_2_conv[0][0]']
conv4_block15_0_bn (BatchNorma (None, 14, 14, 704) 2816 ['conv4_block14_concat[0][0]']
lization)
conv4_block15_0_relu (Activati (None, 14, 14, 704) 0 ['conv4_block15_0_bn[0][0]']
on)
conv4_block15_1_conv (Conv2D) (None, 14, 14, 128) 90112 ['conv4_block15_0_relu[0][0]']
conv4_block15_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block15_1_conv[0][0]']
lization)
conv4_block15_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block15_1_bn[0][0]']
on)
conv4_block15_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block15_1_relu[0][0]']
conv4_block15_concat (Concaten (None, 14, 14, 736) 0 ['conv4_block14_concat[0][0]',
ate) 'conv4_block15_2_conv[0][0]']
conv4_block16_0_bn (BatchNorma (None, 14, 14, 736) 2944 ['conv4_block15_concat[0][0]']
lization)
conv4_block16_0_relu (Activati (None, 14, 14, 736) 0 ['conv4_block16_0_bn[0][0]']
on)
conv4_block16_1_conv (Conv2D) (None, 14, 14, 128) 94208 ['conv4_block16_0_relu[0][0]']
conv4_block16_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block16_1_conv[0][0]']
lization)
conv4_block16_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block16_1_bn[0][0]']
on)
conv4_block16_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block16_1_relu[0][0]']
conv4_block16_concat (Concaten (None, 14, 14, 768) 0 ['conv4_block15_concat[0][0]',
ate) 'conv4_block16_2_conv[0][0]']
conv4_block17_0_bn (BatchNorma (None, 14, 14, 768) 3072 ['conv4_block16_concat[0][0]']
lization)
conv4_block17_0_relu (Activati (None, 14, 14, 768) 0 ['conv4_block17_0_bn[0][0]']
on)
conv4_block17_1_conv (Conv2D) (None, 14, 14, 128) 98304 ['conv4_block17_0_relu[0][0]']
conv4_block17_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block17_1_conv[0][0]']
lization)
conv4_block17_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block17_1_bn[0][0]']
on)
conv4_block17_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block17_1_relu[0][0]']
conv4_block17_concat (Concaten (None, 14, 14, 800) 0 ['conv4_block16_concat[0][0]',
ate) 'conv4_block17_2_conv[0][0]']
conv4_block18_0_bn (BatchNorma (None, 14, 14, 800) 3200 ['conv4_block17_concat[0][0]']
lization)
conv4_block18_0_relu (Activati (None, 14, 14, 800) 0 ['conv4_block18_0_bn[0][0]']
on)
conv4_block18_1_conv (Conv2D) (None, 14, 14, 128) 102400 ['conv4_block18_0_relu[0][0]']
conv4_block18_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block18_1_conv[0][0]']
lization)
conv4_block18_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block18_1_bn[0][0]']
on)
conv4_block18_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block18_1_relu[0][0]']
conv4_block18_concat (Concaten (None, 14, 14, 832) 0 ['conv4_block17_concat[0][0]',
ate) 'conv4_block18_2_conv[0][0]']
conv4_block19_0_bn (BatchNorma (None, 14, 14, 832) 3328 ['conv4_block18_concat[0][0]']
lization)
conv4_block19_0_relu (Activati (None, 14, 14, 832) 0 ['conv4_block19_0_bn[0][0]']
on)
conv4_block19_1_conv (Conv2D) (None, 14, 14, 128) 106496 ['conv4_block19_0_relu[0][0]']
conv4_block19_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block19_1_conv[0][0]']
lization)
conv4_block19_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block19_1_bn[0][0]']
on)
conv4_block19_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block19_1_relu[0][0]']
conv4_block19_concat (Concaten (None, 14, 14, 864) 0 ['conv4_block18_concat[0][0]',
ate) 'conv4_block19_2_conv[0][0]']
conv4_block20_0_bn (BatchNorma (None, 14, 14, 864) 3456 ['conv4_block19_concat[0][0]']
lization)
conv4_block20_0_relu (Activati (None, 14, 14, 864) 0 ['conv4_block20_0_bn[0][0]']
on)
conv4_block20_1_conv (Conv2D) (None, 14, 14, 128) 110592 ['conv4_block20_0_relu[0][0]']
conv4_block20_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block20_1_conv[0][0]']
lization)
conv4_block20_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block20_1_bn[0][0]']
on)
conv4_block20_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block20_1_relu[0][0]']
conv4_block20_concat (Concaten (None, 14, 14, 896) 0 ['conv4_block19_concat[0][0]',
ate) 'conv4_block20_2_conv[0][0]']
conv4_block21_0_bn (BatchNorma (None, 14, 14, 896) 3584 ['conv4_block20_concat[0][0]']
lization)
conv4_block21_0_relu (Activati (None, 14, 14, 896) 0 ['conv4_block21_0_bn[0][0]']
on)
conv4_block21_1_conv (Conv2D) (None, 14, 14, 128) 114688 ['conv4_block21_0_relu[0][0]']
conv4_block21_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block21_1_conv[0][0]']
lization)
conv4_block21_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block21_1_bn[0][0]']
on)
conv4_block21_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block21_1_relu[0][0]']
conv4_block21_concat (Concaten (None, 14, 14, 928) 0 ['conv4_block20_concat[0][0]',
ate) 'conv4_block21_2_conv[0][0]']
conv4_block22_0_bn (BatchNorma (None, 14, 14, 928) 3712 ['conv4_block21_concat[0][0]']
lization)
conv4_block22_0_relu (Activati (None, 14, 14, 928) 0 ['conv4_block22_0_bn[0][0]']
on)
conv4_block22_1_conv (Conv2D) (None, 14, 14, 128) 118784 ['conv4_block22_0_relu[0][0]']
conv4_block22_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block22_1_conv[0][0]']
lization)
conv4_block22_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block22_1_bn[0][0]']
on)
conv4_block22_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block22_1_relu[0][0]']
conv4_block22_concat (Concaten (None, 14, 14, 960) 0 ['conv4_block21_concat[0][0]',
ate) 'conv4_block22_2_conv[0][0]']
conv4_block23_0_bn (BatchNorma (None, 14, 14, 960) 3840 ['conv4_block22_concat[0][0]']
lization)
conv4_block23_0_relu (Activati (None, 14, 14, 960) 0 ['conv4_block23_0_bn[0][0]']
on)
conv4_block23_1_conv (Conv2D) (None, 14, 14, 128) 122880 ['conv4_block23_0_relu[0][0]']
conv4_block23_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block23_1_conv[0][0]']
lization)
conv4_block23_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block23_1_bn[0][0]']
on)
conv4_block23_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block23_1_relu[0][0]']
conv4_block23_concat (Concaten (None, 14, 14, 992) 0 ['conv4_block22_concat[0][0]',
ate) 'conv4_block23_2_conv[0][0]']
conv4_block24_0_bn (BatchNorma (None, 14, 14, 992) 3968 ['conv4_block23_concat[0][0]']
lization)
conv4_block24_0_relu (Activati (None, 14, 14, 992) 0 ['conv4_block24_0_bn[0][0]']
on)
conv4_block24_1_conv (Conv2D) (None, 14, 14, 128) 126976 ['conv4_block24_0_relu[0][0]']
conv4_block24_1_bn (BatchNorma (None, 14, 14, 128) 512 ['conv4_block24_1_conv[0][0]']
lization)
conv4_block24_1_relu (Activati (None, 14, 14, 128) 0 ['conv4_block24_1_bn[0][0]']
on)
conv4_block24_2_conv (Conv2D) (None, 14, 14, 32) 36864 ['conv4_block24_1_relu[0][0]']
conv4_block24_concat (Concaten (None, 14, 14, 1024 0 ['conv4_block23_concat[0][0]',
ate) ) 'conv4_block24_2_conv[0][0]']
pool4_bn (BatchNormalization) (None, 14, 14, 1024 4096 ['conv4_block24_concat[0][0]']
)
pool4_relu (Activation) (None, 14, 14, 1024 0 ['pool4_bn[0][0]']
)
pool4_conv (Conv2D) (None, 14, 14, 512) 524288 ['pool4_relu[0][0]']
pool4_pool (AveragePooling2D) (None, 7, 7, 512) 0 ['pool4_conv[0][0]']
conv5_block1_0_bn (BatchNormal (None, 7, 7, 512) 2048 ['pool4_pool[0][0]']
ization)
conv5_block1_0_relu (Activatio (None, 7, 7, 512) 0 ['conv5_block1_0_bn[0][0]']
n)
conv5_block1_1_conv (Conv2D) (None, 7, 7, 128) 65536 ['conv5_block1_0_relu[0][0]']
conv5_block1_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block1_1_conv[0][0]']
ization)
conv5_block1_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block1_1_bn[0][0]']
n)
conv5_block1_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block1_1_relu[0][0]']
conv5_block1_concat (Concatena (None, 7, 7, 544) 0 ['pool4_pool[0][0]',
te) 'conv5_block1_2_conv[0][0]']
conv5_block2_0_bn (BatchNormal (None, 7, 7, 544) 2176 ['conv5_block1_concat[0][0]']
ization)
conv5_block2_0_relu (Activatio (None, 7, 7, 544) 0 ['conv5_block2_0_bn[0][0]']
n)
conv5_block2_1_conv (Conv2D) (None, 7, 7, 128) 69632 ['conv5_block2_0_relu[0][0]']
conv5_block2_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block2_1_conv[0][0]']
ization)
conv5_block2_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block2_1_bn[0][0]']
n)
conv5_block2_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block2_1_relu[0][0]']
conv5_block2_concat (Concatena (None, 7, 7, 576) 0 ['conv5_block1_concat[0][0]',
te) 'conv5_block2_2_conv[0][0]']
conv5_block3_0_bn (BatchNormal (None, 7, 7, 576) 2304 ['conv5_block2_concat[0][0]']
ization)
conv5_block3_0_relu (Activatio (None, 7, 7, 576) 0 ['conv5_block3_0_bn[0][0]']
n)
conv5_block3_1_conv (Conv2D) (None, 7, 7, 128) 73728 ['conv5_block3_0_relu[0][0]']
conv5_block3_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block3_1_conv[0][0]']
ization)
conv5_block3_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block3_1_bn[0][0]']
n)
conv5_block3_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block3_1_relu[0][0]']
conv5_block3_concat (Concatena (None, 7, 7, 608) 0 ['conv5_block2_concat[0][0]',
te) 'conv5_block3_2_conv[0][0]']
conv5_block4_0_bn (BatchNormal (None, 7, 7, 608) 2432 ['conv5_block3_concat[0][0]']
ization)
conv5_block4_0_relu (Activatio (None, 7, 7, 608) 0 ['conv5_block4_0_bn[0][0]']
n)
conv5_block4_1_conv (Conv2D) (None, 7, 7, 128) 77824 ['conv5_block4_0_relu[0][0]']
conv5_block4_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block4_1_conv[0][0]']
ization)
conv5_block4_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block4_1_bn[0][0]']
n)
conv5_block4_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block4_1_relu[0][0]']
conv5_block4_concat (Concatena (None, 7, 7, 640) 0 ['conv5_block3_concat[0][0]',
te) 'conv5_block4_2_conv[0][0]']
conv5_block5_0_bn (BatchNormal (None, 7, 7, 640) 2560 ['conv5_block4_concat[0][0]']
ization)
conv5_block5_0_relu (Activatio (None, 7, 7, 640) 0 ['conv5_block5_0_bn[0][0]']
n)
conv5_block5_1_conv (Conv2D) (None, 7, 7, 128) 81920 ['conv5_block5_0_relu[0][0]']
conv5_block5_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block5_1_conv[0][0]']
ization)
conv5_block5_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block5_1_bn[0][0]']
n)
conv5_block5_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block5_1_relu[0][0]']
conv5_block5_concat (Concatena (None, 7, 7, 672) 0 ['conv5_block4_concat[0][0]',
te) 'conv5_block5_2_conv[0][0]']
conv5_block6_0_bn (BatchNormal (None, 7, 7, 672) 2688 ['conv5_block5_concat[0][0]']
ization)
conv5_block6_0_relu (Activatio (None, 7, 7, 672) 0 ['conv5_block6_0_bn[0][0]']
n)
conv5_block6_1_conv (Conv2D) (None, 7, 7, 128) 86016 ['conv5_block6_0_relu[0][0]']
conv5_block6_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block6_1_conv[0][0]']
ization)
conv5_block6_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block6_1_bn[0][0]']
n)
conv5_block6_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block6_1_relu[0][0]']
conv5_block6_concat (Concatena (None, 7, 7, 704) 0 ['conv5_block5_concat[0][0]',
te) 'conv5_block6_2_conv[0][0]']
conv5_block7_0_bn (BatchNormal (None, 7, 7, 704) 2816 ['conv5_block6_concat[0][0]']
ization)
conv5_block7_0_relu (Activatio (None, 7, 7, 704) 0 ['conv5_block7_0_bn[0][0]']
n)
conv5_block7_1_conv (Conv2D) (None, 7, 7, 128) 90112 ['conv5_block7_0_relu[0][0]']
conv5_block7_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block7_1_conv[0][0]']
ization)
conv5_block7_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block7_1_bn[0][0]']
n)
conv5_block7_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block7_1_relu[0][0]']
conv5_block7_concat (Concatena (None, 7, 7, 736) 0 ['conv5_block6_concat[0][0]',
te) 'conv5_block7_2_conv[0][0]']
conv5_block8_0_bn (BatchNormal (None, 7, 7, 736) 2944 ['conv5_block7_concat[0][0]']
ization)
conv5_block8_0_relu (Activatio (None, 7, 7, 736) 0 ['conv5_block8_0_bn[0][0]']
n)
conv5_block8_1_conv (Conv2D) (None, 7, 7, 128) 94208 ['conv5_block8_0_relu[0][0]']
conv5_block8_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block8_1_conv[0][0]']
ization)
conv5_block8_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block8_1_bn[0][0]']
n)
conv5_block8_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block8_1_relu[0][0]']
conv5_block8_concat (Concatena (None, 7, 7, 768) 0 ['conv5_block7_concat[0][0]',
te) 'conv5_block8_2_conv[0][0]']
conv5_block9_0_bn (BatchNormal (None, 7, 7, 768) 3072 ['conv5_block8_concat[0][0]']
ization)
conv5_block9_0_relu (Activatio (None, 7, 7, 768) 0 ['conv5_block9_0_bn[0][0]']
n)
conv5_block9_1_conv (Conv2D) (None, 7, 7, 128) 98304 ['conv5_block9_0_relu[0][0]']
conv5_block9_1_bn (BatchNormal (None, 7, 7, 128) 512 ['conv5_block9_1_conv[0][0]']
ization)
conv5_block9_1_relu (Activatio (None, 7, 7, 128) 0 ['conv5_block9_1_bn[0][0]']
n)
conv5_block9_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block9_1_relu[0][0]']
conv5_block9_concat (Concatena (None, 7, 7, 800) 0 ['conv5_block8_concat[0][0]',
te) 'conv5_block9_2_conv[0][0]']
conv5_block10_0_bn (BatchNorma (None, 7, 7, 800) 3200 ['conv5_block9_concat[0][0]']
lization)
conv5_block10_0_relu (Activati (None, 7, 7, 800) 0 ['conv5_block10_0_bn[0][0]']
on)
conv5_block10_1_conv (Conv2D) (None, 7, 7, 128) 102400 ['conv5_block10_0_relu[0][0]']
conv5_block10_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block10_1_conv[0][0]']
lization)
conv5_block10_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block10_1_bn[0][0]']
on)
conv5_block10_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block10_1_relu[0][0]']
conv5_block10_concat (Concaten (None, 7, 7, 832) 0 ['conv5_block9_concat[0][0]',
ate) 'conv5_block10_2_conv[0][0]']
conv5_block11_0_bn (BatchNorma (None, 7, 7, 832) 3328 ['conv5_block10_concat[0][0]']
lization)
conv5_block11_0_relu (Activati (None, 7, 7, 832) 0 ['conv5_block11_0_bn[0][0]']
on)
conv5_block11_1_conv (Conv2D) (None, 7, 7, 128) 106496 ['conv5_block11_0_relu[0][0]']
conv5_block11_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block11_1_conv[0][0]']
lization)
conv5_block11_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block11_1_bn[0][0]']
on)
conv5_block11_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block11_1_relu[0][0]']
conv5_block11_concat (Concaten (None, 7, 7, 864) 0 ['conv5_block10_concat[0][0]',
ate) 'conv5_block11_2_conv[0][0]']
conv5_block12_0_bn (BatchNorma (None, 7, 7, 864) 3456 ['conv5_block11_concat[0][0]']
lization)
conv5_block12_0_relu (Activati (None, 7, 7, 864) 0 ['conv5_block12_0_bn[0][0]']
on)
conv5_block12_1_conv (Conv2D) (None, 7, 7, 128) 110592 ['conv5_block12_0_relu[0][0]']
conv5_block12_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block12_1_conv[0][0]']
lization)
conv5_block12_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block12_1_bn[0][0]']
on)
conv5_block12_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block12_1_relu[0][0]']
conv5_block12_concat (Concaten (None, 7, 7, 896) 0 ['conv5_block11_concat[0][0]',
ate) 'conv5_block12_2_conv[0][0]']
conv5_block13_0_bn (BatchNorma (None, 7, 7, 896) 3584 ['conv5_block12_concat[0][0]']
lization)
conv5_block13_0_relu (Activati (None, 7, 7, 896) 0 ['conv5_block13_0_bn[0][0]']
on)
conv5_block13_1_conv (Conv2D) (None, 7, 7, 128) 114688 ['conv5_block13_0_relu[0][0]']
conv5_block13_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block13_1_conv[0][0]']
lization)
conv5_block13_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block13_1_bn[0][0]']
on)
conv5_block13_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block13_1_relu[0][0]']
conv5_block13_concat (Concaten (None, 7, 7, 928) 0 ['conv5_block12_concat[0][0]',
ate) 'conv5_block13_2_conv[0][0]']
conv5_block14_0_bn (BatchNorma (None, 7, 7, 928) 3712 ['conv5_block13_concat[0][0]']
lization)
conv5_block14_0_relu (Activati (None, 7, 7, 928) 0 ['conv5_block14_0_bn[0][0]']
on)
conv5_block14_1_conv (Conv2D) (None, 7, 7, 128) 118784 ['conv5_block14_0_relu[0][0]']
conv5_block14_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block14_1_conv[0][0]']
lization)
conv5_block14_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block14_1_bn[0][0]']
on)
conv5_block14_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block14_1_relu[0][0]']
conv5_block14_concat (Concaten (None, 7, 7, 960) 0 ['conv5_block13_concat[0][0]',
ate) 'conv5_block14_2_conv[0][0]']
conv5_block15_0_bn (BatchNorma (None, 7, 7, 960) 3840 ['conv5_block14_concat[0][0]']
lization)
conv5_block15_0_relu (Activati (None, 7, 7, 960) 0 ['conv5_block15_0_bn[0][0]']
on)
conv5_block15_1_conv (Conv2D) (None, 7, 7, 128) 122880 ['conv5_block15_0_relu[0][0]']
conv5_block15_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block15_1_conv[0][0]']
lization)
conv5_block15_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block15_1_bn[0][0]']
on)
conv5_block15_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block15_1_relu[0][0]']
conv5_block15_concat (Concaten (None, 7, 7, 992) 0 ['conv5_block14_concat[0][0]',
ate) 'conv5_block15_2_conv[0][0]']
conv5_block16_0_bn (BatchNorma (None, 7, 7, 992) 3968 ['conv5_block15_concat[0][0]']
lization)
conv5_block16_0_relu (Activati (None, 7, 7, 992) 0 ['conv5_block16_0_bn[0][0]']
on)
conv5_block16_1_conv (Conv2D) (None, 7, 7, 128) 126976 ['conv5_block16_0_relu[0][0]']
conv5_block16_1_bn (BatchNorma (None, 7, 7, 128) 512 ['conv5_block16_1_conv[0][0]']
lization)
conv5_block16_1_relu (Activati (None, 7, 7, 128) 0 ['conv5_block16_1_bn[0][0]']
on)
conv5_block16_2_conv (Conv2D) (None, 7, 7, 32) 36864 ['conv5_block16_1_relu[0][0]']
conv5_block16_concat (Concaten (None, 7, 7, 1024) 0 ['conv5_block15_concat[0][0]',
ate) 'conv5_block16_2_conv[0][0]']
bn (BatchNormalization) (None, 7, 7, 1024) 4096 ['conv5_block16_concat[0][0]']
relu (Activation) (None, 7, 7, 1024) 0 ['bn[0][0]']
avg_pool (GlobalAveragePooling (None, 1024) 0 ['relu[0][0]']
2D)
predictions (Dense) (None, 1000) 1025000 ['avg_pool[0][0]']
==================================================================================================
Total params: 8,062,504
Trainable params: 7,978,856
Non-trainable params: 83,648
__________________________________________________________________________________________________
None
Now after loading the model and setting up the parameters it is the time for predicting the image as demonstrated below.
import numpy as np
from keras.applications.imagenet_utils import preprocess_input, decode_predictionsPred = Densenet_MODEL.predict(image). #Line 3
print(np.argmax(Pred))
print('Predicted:', decode_predictions(Pred)). #Line 4
Line 3: This snippets send the pre-processed image to the Densenet network for getting prediction.
Line 4 and Line 5: These two line accept the prediction from the model and output the top 5 prediction probabilities which is shown below.
Downloading data from https://storage.googleapis.com/download.tensorflow.org/data/imagenet_class_index.json 40960/35363 [==================================] - 0s 0us/step 49152/35363 [=========================================] - 0s 0us/step Predicted: [[('n03063599', 'coffee_mug', 0.870349), ('n04560804', 'water_jug', 0.06071592), ('n07930864', 'cup', 0.022826966), ('n03063689', 'coffeepot', 0.012672128), ('n03950228', 'pitcher', 0.0049368944)]]
As I have mentioned above, we will discuss implementation of the pre-trained Densenet model in 4 ways which are as follows:
- As a feature Extraction model.
- Using Pre-trained models Densenet architecture.
- Fine tunning Pre-trained models Densenet architecture.
- Using Pre-trained model weights as a weight initialiser.
So without any further delay lets start our implementation in Keras :).
2.1. As a feature Extraction model.
Since we have discussed the Densenet model in details in out previous article i.e. in part 7.0 of Transfer Learning Series and we know the model have been trained in huge dataset named as ImageNet which has 1000 object. So we can use the pre-trained Densenet to extract the features from the image and we can feed the features in another Machine model for classification, self-supervise learning or many other application. It will give us the following benefits:
- No need to train very deep Deep Learning Model.
- Easy to implement the any algorithm if datasets is small also.
- No need of high computing resources.
- Less development time as well as the less deployment time.
2.1.1 Dataset
For feature extraction we will use CIFAR-10 dataset composed of 60K images, 50K for trainning and 10K for testing/evaluation.
(trainX, trainy), (testX, testy) = tf.keras.datasets.cifar10.load_data() #Line 1
Line 1: The above snippet used to import the datasets into separate variable and labels fir testing and training purpose.
from matplotlib import pyplot #Line 2
print('Train: X=%s, y=%s' % (trainX.shape, trainy.shape)) #Line 3
print('Test: X=%s, y=%s' % (testX.shape, testy.shape)) #Line 4
for i in range(9): #Line 5#
define subplotpyplot.subplot(330 + 1 + i) #Line 6
# plot raw pixel data
pyplot.imshow(trainX[i], cmap=pyplot.get_cmap('gray')) #Line 7
# show the figure
pyplot.show() #Line 8
Line 2: This code snippet is used to import the Matplot library for plotting.
Line 3 and Line 4: This code snippet is used to display the training and testing dataset size as shown below:
Train: X=(50000, 32, 32, 3), y=(50000, 1)
Test: X=(10000, 32, 32, 3), y=(10000, 1)
Line 5 to Line 8: These code snippets are used to display the samples from the dataset as shown below:
If you want to have the insight of the visualization library please follow the below mention article series:
trainY=tf.keras.utils.to_categorical(trainy, num_classes=10) #Line 9
testY=tf.keras.utils.to_categorical(testy, num_classes=10) #Line 10
Line 9 and Line 10: Since we have 10 classes and labels are number from 0 to 9 so we have to hot encoded these labels thgis has been done by the help of this snippets.
2.1.2 Densenet Implementation as Feature extraction(code)
In this section we will see how we can implement Densenet as a architecture in Keras:
import tensorflow as tf #Line 1
Line 1: The above snippet is used to import the TensorFlow library which we use use to implement Keras.
image_input = tf.keras.layers.Input(shape=(32,32, 3)). #Line 2
baseModel=tf.keras.applications.DenseNet121(include_top=False,weights=''imagenet',input_tensor=image_input) #Line 3
baseModel.summary(). #Line 4
Line 2 : We have specified out datasets to be of shape (32,32,3) i.e. in channel last format where channel number is 3, Height and Width of the Images are 32 respectively.
Line 3: We have imported the pre-trained Densenet with weight by specifying weights=’imagenet’, we have excluded the Dense layer by include_top=False since we have to get the features from the image though there is option available to us where we can use dense layer to get 1d- feature tensor from this model also we have used Line 2 in Line 3 to specify the input shape of the model by input_tensor=image_input.
Line 4: This snippet is used to display the Summary of the Densenet model which will be used to extract feature from the image shown below.
Model: "densenet121" __________________________________________________________________________________________________ Layer (type) Output Shape Param # Connected to ================================================================================================== input_6 (InputLayer) [(None, 32, 32, 3)] 0 [] zero_padding2d_8 (ZeroPadding2 (None, 38, 38, 3) 0 ['input_6[0][0]'] D) conv1/conv (Conv2D) (None, 16, 16, 64) 9408 ['zero_padding2d_8[0][0]'] conv1/bn (BatchNormalization) (None, 16, 16, 64) 256 ['conv1/conv[0][0]'] conv1/relu (Activation) (None, 16, 16, 64) 0 ['conv1/bn[0][0]'] zero_padding2d_9 (ZeroPadding2 (None, 18, 18, 64) 0 ['conv1/relu[0][0]'] D) pool1 (MaxPooling2D) (None, 8, 8, 64) 0 ['zero_padding2d_9[0][0]'] conv2_block1_0_bn (BatchNormal (None, 8, 8, 64) 256 ['pool1[0][0]'] ization) conv2_block1_0_relu (Activatio (None, 8, 8, 64) 0 ['conv2_block1_0_bn[0][0]'] n) conv2_block1_1_conv (Conv2D) (None, 8, 8, 128) 8192 ['conv2_block1_0_relu[0][0]'] conv2_block1_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block1_1_conv[0][0]'] ization) conv2_block1_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block1_1_bn[0][0]'] n) conv2_block1_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block1_1_relu[0][0]'] conv2_block1_concat (Concatena (None, 8, 8, 96) 0 ['pool1[0][0]', te) 'conv2_block1_2_conv[0][0]'] conv2_block2_0_bn (BatchNormal (None, 8, 8, 96) 384 ['conv2_block1_concat[0][0]'] ization) conv2_block2_0_relu (Activatio (None, 8, 8, 96) 0 ['conv2_block2_0_bn[0][0]'] n) conv2_block2_1_conv (Conv2D) (None, 8, 8, 128) 12288 ['conv2_block2_0_relu[0][0]'] conv2_block2_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block2_1_conv[0][0]'] ization) conv2_block2_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block2_1_bn[0][0]'] n) conv2_block2_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block2_1_relu[0][0]'] conv2_block2_concat (Concatena (None, 8, 8, 128) 0 ['conv2_block1_concat[0][0]', te) 'conv2_block2_2_conv[0][0]'] conv2_block3_0_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block2_concat[0][0]'] ization) conv2_block3_0_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block3_0_bn[0][0]'] n) conv2_block3_1_conv (Conv2D) (None, 8, 8, 128) 16384 ['conv2_block3_0_relu[0][0]'] conv2_block3_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block3_1_conv[0][0]'] ization) conv2_block3_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block3_1_bn[0][0]'] n) conv2_block3_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block3_1_relu[0][0]'] conv2_block3_concat (Concatena (None, 8, 8, 160) 0 ['conv2_block2_concat[0][0]', te) 'conv2_block3_2_conv[0][0]'] conv2_block4_0_bn (BatchNormal (None, 8, 8, 160) 640 ['conv2_block3_concat[0][0]'] ization) conv2_block4_0_relu (Activatio (None, 8, 8, 160) 0 ['conv2_block4_0_bn[0][0]'] n) conv2_block4_1_conv (Conv2D) (None, 8, 8, 128) 20480 ['conv2_block4_0_relu[0][0]'] conv2_block4_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block4_1_conv[0][0]'] ization) conv2_block4_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block4_1_bn[0][0]'] n) conv2_block4_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block4_1_relu[0][0]'] conv2_block4_concat (Concatena (None, 8, 8, 192) 0 ['conv2_block3_concat[0][0]', te) 'conv2_block4_2_conv[0][0]'] conv2_block5_0_bn (BatchNormal (None, 8, 8, 192) 768 ['conv2_block4_concat[0][0]'] ization) conv2_block5_0_relu (Activatio (None, 8, 8, 192) 0 ['conv2_block5_0_bn[0][0]'] n) conv2_block5_1_conv (Conv2D) (None, 8, 8, 128) 24576 ['conv2_block5_0_relu[0][0]'] conv2_block5_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block5_1_conv[0][0]'] ization) conv2_block5_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block5_1_bn[0][0]'] n) conv2_block5_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block5_1_relu[0][0]'] conv2_block5_concat (Concatena (None, 8, 8, 224) 0 ['conv2_block4_concat[0][0]', te) 'conv2_block5_2_conv[0][0]'] conv2_block6_0_bn (BatchNormal (None, 8, 8, 224) 896 ['conv2_block5_concat[0][0]'] ization) conv2_block6_0_relu (Activatio (None, 8, 8, 224) 0 ['conv2_block6_0_bn[0][0]'] n) conv2_block6_1_conv (Conv2D) (None, 8, 8, 128) 28672 ['conv2_block6_0_relu[0][0]'] conv2_block6_1_bn (BatchNormal (None, 8, 8, 128) 512 ['conv2_block6_1_conv[0][0]'] ization) conv2_block6_1_relu (Activatio (None, 8, 8, 128) 0 ['conv2_block6_1_bn[0][0]'] n) conv2_block6_2_conv (Conv2D) (None, 8, 8, 32) 36864 ['conv2_block6_1_relu[0][0]'] conv2_block6_concat (Concatena (None, 8, 8, 256) 0 ['conv2_block5_concat[0][0]', te) 'conv2_block6_2_conv[0][0]'] pool2_bn (BatchNormalization) (None, 8, 8, 256) 1024 ['conv2_block6_concat[0][0]'] pool2_relu (Activation) (None, 8, 8, 256) 0 ['pool2_bn[0][0]'] pool2_conv (Conv2D) (None, 8, 8, 128) 32768 ['pool2_relu[0][0]'] pool2_pool (AveragePooling2D) (None, 4, 4, 128) 0 ['pool2_conv[0][0]'] conv3_block1_0_bn (BatchNormal (None, 4, 4, 128) 512 ['pool2_pool[0][0]'] ization) conv3_block1_0_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block1_0_bn[0][0]'] n) conv3_block1_1_conv (Conv2D) (None, 4, 4, 128) 16384 ['conv3_block1_0_relu[0][0]'] conv3_block1_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block1_1_conv[0][0]'] ization) conv3_block1_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block1_1_bn[0][0]'] n) conv3_block1_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block1_1_relu[0][0]'] conv3_block1_concat (Concatena (None, 4, 4, 160) 0 ['pool2_pool[0][0]', te) 'conv3_block1_2_conv[0][0]'] conv3_block2_0_bn (BatchNormal (None, 4, 4, 160) 640 ['conv3_block1_concat[0][0]'] ization) conv3_block2_0_relu (Activatio (None, 4, 4, 160) 0 ['conv3_block2_0_bn[0][0]'] n) conv3_block2_1_conv (Conv2D) (None, 4, 4, 128) 20480 ['conv3_block2_0_relu[0][0]'] conv3_block2_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block2_1_conv[0][0]'] ization) conv3_block2_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block2_1_bn[0][0]'] n) conv3_block2_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block2_1_relu[0][0]'] conv3_block2_concat (Concatena (None, 4, 4, 192) 0 ['conv3_block1_concat[0][0]', te) 'conv3_block2_2_conv[0][0]'] conv3_block3_0_bn (BatchNormal (None, 4, 4, 192) 768 ['conv3_block2_concat[0][0]'] ization) conv3_block3_0_relu (Activatio (None, 4, 4, 192) 0 ['conv3_block3_0_bn[0][0]'] n) conv3_block3_1_conv (Conv2D) (None, 4, 4, 128) 24576 ['conv3_block3_0_relu[0][0]'] conv3_block3_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block3_1_conv[0][0]'] ization) conv3_block3_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block3_1_bn[0][0]'] n) conv3_block3_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block3_1_relu[0][0]'] conv3_block3_concat (Concatena (None, 4, 4, 224) 0 ['conv3_block2_concat[0][0]', te) 'conv3_block3_2_conv[0][0]'] conv3_block4_0_bn (BatchNormal (None, 4, 4, 224) 896 ['conv3_block3_concat[0][0]'] ization) conv3_block4_0_relu (Activatio (None, 4, 4, 224) 0 ['conv3_block4_0_bn[0][0]'] n) conv3_block4_1_conv (Conv2D) (None, 4, 4, 128) 28672 ['conv3_block4_0_relu[0][0]'] conv3_block4_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block4_1_conv[0][0]'] ization) conv3_block4_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block4_1_bn[0][0]'] n) conv3_block4_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block4_1_relu[0][0]'] conv3_block4_concat (Concatena (None, 4, 4, 256) 0 ['conv3_block3_concat[0][0]', te) 'conv3_block4_2_conv[0][0]'] conv3_block5_0_bn (BatchNormal (None, 4, 4, 256) 1024 ['conv3_block4_concat[0][0]'] ization) conv3_block5_0_relu (Activatio (None, 4, 4, 256) 0 ['conv3_block5_0_bn[0][0]'] n) conv3_block5_1_conv (Conv2D) (None, 4, 4, 128) 32768 ['conv3_block5_0_relu[0][0]'] conv3_block5_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block5_1_conv[0][0]'] ization) conv3_block5_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block5_1_bn[0][0]'] n) conv3_block5_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block5_1_relu[0][0]'] conv3_block5_concat (Concatena (None, 4, 4, 288) 0 ['conv3_block4_concat[0][0]', te) 'conv3_block5_2_conv[0][0]'] conv3_block6_0_bn (BatchNormal (None, 4, 4, 288) 1152 ['conv3_block5_concat[0][0]'] ization) conv3_block6_0_relu (Activatio (None, 4, 4, 288) 0 ['conv3_block6_0_bn[0][0]'] n) conv3_block6_1_conv (Conv2D) (None, 4, 4, 128) 36864 ['conv3_block6_0_relu[0][0]'] conv3_block6_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block6_1_conv[0][0]'] ization) conv3_block6_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block6_1_bn[0][0]'] n) conv3_block6_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block6_1_relu[0][0]'] conv3_block6_concat (Concatena (None, 4, 4, 320) 0 ['conv3_block5_concat[0][0]', te) 'conv3_block6_2_conv[0][0]'] conv3_block7_0_bn (BatchNormal (None, 4, 4, 320) 1280 ['conv3_block6_concat[0][0]'] ization) conv3_block7_0_relu (Activatio (None, 4, 4, 320) 0 ['conv3_block7_0_bn[0][0]'] n) conv3_block7_1_conv (Conv2D) (None, 4, 4, 128) 40960 ['conv3_block7_0_relu[0][0]'] conv3_block7_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block7_1_conv[0][0]'] ization) conv3_block7_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block7_1_bn[0][0]'] n) conv3_block7_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block7_1_relu[0][0]'] conv3_block7_concat (Concatena (None, 4, 4, 352) 0 ['conv3_block6_concat[0][0]', te) 'conv3_block7_2_conv[0][0]'] conv3_block8_0_bn (BatchNormal (None, 4, 4, 352) 1408 ['conv3_block7_concat[0][0]'] ization) conv3_block8_0_relu (Activatio (None, 4, 4, 352) 0 ['conv3_block8_0_bn[0][0]'] n) conv3_block8_1_conv (Conv2D) (None, 4, 4, 128) 45056 ['conv3_block8_0_relu[0][0]'] conv3_block8_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block8_1_conv[0][0]'] ization) conv3_block8_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block8_1_bn[0][0]'] n) conv3_block8_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block8_1_relu[0][0]'] conv3_block8_concat (Concatena (None, 4, 4, 384) 0 ['conv3_block7_concat[0][0]', te) 'conv3_block8_2_conv[0][0]'] conv3_block9_0_bn (BatchNormal (None, 4, 4, 384) 1536 ['conv3_block8_concat[0][0]'] ization) conv3_block9_0_relu (Activatio (None, 4, 4, 384) 0 ['conv3_block9_0_bn[0][0]'] n) conv3_block9_1_conv (Conv2D) (None, 4, 4, 128) 49152 ['conv3_block9_0_relu[0][0]'] conv3_block9_1_bn (BatchNormal (None, 4, 4, 128) 512 ['conv3_block9_1_conv[0][0]'] ization) conv3_block9_1_relu (Activatio (None, 4, 4, 128) 0 ['conv3_block9_1_bn[0][0]'] n) conv3_block9_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block9_1_relu[0][0]'] conv3_block9_concat (Concatena (None, 4, 4, 416) 0 ['conv3_block8_concat[0][0]', te) 'conv3_block9_2_conv[0][0]'] conv3_block10_0_bn (BatchNorma (None, 4, 4, 416) 1664 ['conv3_block9_concat[0][0]'] lization) conv3_block10_0_relu (Activati (None, 4, 4, 416) 0 ['conv3_block10_0_bn[0][0]'] on) conv3_block10_1_conv (Conv2D) (None, 4, 4, 128) 53248 ['conv3_block10_0_relu[0][0]'] conv3_block10_1_bn (BatchNorma (None, 4, 4, 128) 512 ['conv3_block10_1_conv[0][0]'] lization) conv3_block10_1_relu (Activati (None, 4, 4, 128) 0 ['conv3_block10_1_bn[0][0]'] on) conv3_block10_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block10_1_relu[0][0]'] conv3_block10_concat (Concaten (None, 4, 4, 448) 0 ['conv3_block9_concat[0][0]', ate) 'conv3_block10_2_conv[0][0]'] conv3_block11_0_bn (BatchNorma (None, 4, 4, 448) 1792 ['conv3_block10_concat[0][0]'] lization) conv3_block11_0_relu (Activati (None, 4, 4, 448) 0 ['conv3_block11_0_bn[0][0]'] on) conv3_block11_1_conv (Conv2D) (None, 4, 4, 128) 57344 ['conv3_block11_0_relu[0][0]'] conv3_block11_1_bn (BatchNorma (None, 4, 4, 128) 512 ['conv3_block11_1_conv[0][0]'] lization) conv3_block11_1_relu (Activati (None, 4, 4, 128) 0 ['conv3_block11_1_bn[0][0]'] on) conv3_block11_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block11_1_relu[0][0]'] conv3_block11_concat (Concaten (None, 4, 4, 480) 0 ['conv3_block10_concat[0][0]', ate) 'conv3_block11_2_conv[0][0]'] conv3_block12_0_bn (BatchNorma (None, 4, 4, 480) 1920 ['conv3_block11_concat[0][0]'] lization) conv3_block12_0_relu (Activati (None, 4, 4, 480) 0 ['conv3_block12_0_bn[0][0]'] on) conv3_block12_1_conv (Conv2D) (None, 4, 4, 128) 61440 ['conv3_block12_0_relu[0][0]'] conv3_block12_1_bn (BatchNorma (None, 4, 4, 128) 512 ['conv3_block12_1_conv[0][0]'] lization) conv3_block12_1_relu (Activati (None, 4, 4, 128) 0 ['conv3_block12_1_bn[0][0]'] on) conv3_block12_2_conv (Conv2D) (None, 4, 4, 32) 36864 ['conv3_block12_1_relu[0][0]'] conv3_block12_concat (Concaten (None, 4, 4, 512) 0 ['conv3_block11_concat[0][0]', ate) 'conv3_block12_2_conv[0][0]'] pool3_bn (BatchNormalization) (None, 4, 4, 512) 2048 ['conv3_block12_concat[0][0]'] pool3_relu (Activation) (None, 4, 4, 512) 0 ['pool3_bn[0][0]'] pool3_conv (Conv2D) (None, 4, 4, 256) 131072 ['pool3_relu[0][0]'] pool3_pool (AveragePooling2D) (None, 2, 2, 256) 0 ['pool3_conv[0][0]'] conv4_block1_0_bn (BatchNormal (None, 2, 2, 256) 1024 ['pool3_pool[0][0]'] ization) conv4_block1_0_relu (Activatio (None, 2, 2, 256) 0 ['conv4_block1_0_bn[0][0]'] n) conv4_block1_1_conv (Conv2D) (None, 2, 2, 128) 32768 ['conv4_block1_0_relu[0][0]'] conv4_block1_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block1_1_conv[0][0]'] ization) conv4_block1_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block1_1_bn[0][0]'] n) conv4_block1_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block1_1_relu[0][0]'] conv4_block1_concat (Concatena (None, 2, 2, 288) 0 ['pool3_pool[0][0]', te) 'conv4_block1_2_conv[0][0]'] conv4_block2_0_bn (BatchNormal (None, 2, 2, 288) 1152 ['conv4_block1_concat[0][0]'] ization) conv4_block2_0_relu (Activatio (None, 2, 2, 288) 0 ['conv4_block2_0_bn[0][0]'] n) conv4_block2_1_conv (Conv2D) (None, 2, 2, 128) 36864 ['conv4_block2_0_relu[0][0]'] conv4_block2_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block2_1_conv[0][0]'] ization) conv4_block2_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block2_1_bn[0][0]'] n) conv4_block2_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block2_1_relu[0][0]'] conv4_block2_concat (Concatena (None, 2, 2, 320) 0 ['conv4_block1_concat[0][0]', te) 'conv4_block2_2_conv[0][0]'] conv4_block3_0_bn (BatchNormal (None, 2, 2, 320) 1280 ['conv4_block2_concat[0][0]'] ization) conv4_block3_0_relu (Activatio (None, 2, 2, 320) 0 ['conv4_block3_0_bn[0][0]'] n) conv4_block3_1_conv (Conv2D) (None, 2, 2, 128) 40960 ['conv4_block3_0_relu[0][0]'] conv4_block3_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block3_1_conv[0][0]'] ization) conv4_block3_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block3_1_bn[0][0]'] n) conv4_block3_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block3_1_relu[0][0]'] conv4_block3_concat (Concatena (None, 2, 2, 352) 0 ['conv4_block2_concat[0][0]', te) 'conv4_block3_2_conv[0][0]'] conv4_block4_0_bn (BatchNormal (None, 2, 2, 352) 1408 ['conv4_block3_concat[0][0]'] ization) conv4_block4_0_relu (Activatio (None, 2, 2, 352) 0 ['conv4_block4_0_bn[0][0]'] n) conv4_block4_1_conv (Conv2D) (None, 2, 2, 128) 45056 ['conv4_block4_0_relu[0][0]'] conv4_block4_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block4_1_conv[0][0]'] ization) conv4_block4_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block4_1_bn[0][0]'] n) conv4_block4_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block4_1_relu[0][0]'] conv4_block4_concat (Concatena (None, 2, 2, 384) 0 ['conv4_block3_concat[0][0]', te) 'conv4_block4_2_conv[0][0]'] conv4_block5_0_bn (BatchNormal (None, 2, 2, 384) 1536 ['conv4_block4_concat[0][0]'] ization) conv4_block5_0_relu (Activatio (None, 2, 2, 384) 0 ['conv4_block5_0_bn[0][0]'] n) conv4_block5_1_conv (Conv2D) (None, 2, 2, 128) 49152 ['conv4_block5_0_relu[0][0]'] conv4_block5_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block5_1_conv[0][0]'] ization) conv4_block5_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block5_1_bn[0][0]'] n) conv4_block5_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block5_1_relu[0][0]'] conv4_block5_concat (Concatena (None, 2, 2, 416) 0 ['conv4_block4_concat[0][0]', te) 'conv4_block5_2_conv[0][0]'] conv4_block6_0_bn (BatchNormal (None, 2, 2, 416) 1664 ['conv4_block5_concat[0][0]'] ization) conv4_block6_0_relu (Activatio (None, 2, 2, 416) 0 ['conv4_block6_0_bn[0][0]'] n) conv4_block6_1_conv (Conv2D) (None, 2, 2, 128) 53248 ['conv4_block6_0_relu[0][0]'] conv4_block6_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block6_1_conv[0][0]'] ization) conv4_block6_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block6_1_bn[0][0]'] n) conv4_block6_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block6_1_relu[0][0]'] conv4_block6_concat (Concatena (None, 2, 2, 448) 0 ['conv4_block5_concat[0][0]', te) 'conv4_block6_2_conv[0][0]'] conv4_block7_0_bn (BatchNormal (None, 2, 2, 448) 1792 ['conv4_block6_concat[0][0]'] ization) conv4_block7_0_relu (Activatio (None, 2, 2, 448) 0 ['conv4_block7_0_bn[0][0]'] n) conv4_block7_1_conv (Conv2D) (None, 2, 2, 128) 57344 ['conv4_block7_0_relu[0][0]'] conv4_block7_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block7_1_conv[0][0]'] ization) conv4_block7_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block7_1_bn[0][0]'] n) conv4_block7_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block7_1_relu[0][0]'] conv4_block7_concat (Concatena (None, 2, 2, 480) 0 ['conv4_block6_concat[0][0]', te) 'conv4_block7_2_conv[0][0]'] conv4_block8_0_bn (BatchNormal (None, 2, 2, 480) 1920 ['conv4_block7_concat[0][0]'] ization) conv4_block8_0_relu (Activatio (None, 2, 2, 480) 0 ['conv4_block8_0_bn[0][0]'] n) conv4_block8_1_conv (Conv2D) (None, 2, 2, 128) 61440 ['conv4_block8_0_relu[0][0]'] conv4_block8_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block8_1_conv[0][0]'] ization) conv4_block8_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block8_1_bn[0][0]'] n) conv4_block8_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block8_1_relu[0][0]'] conv4_block8_concat (Concatena (None, 2, 2, 512) 0 ['conv4_block7_concat[0][0]', te) 'conv4_block8_2_conv[0][0]'] conv4_block9_0_bn (BatchNormal (None, 2, 2, 512) 2048 ['conv4_block8_concat[0][0]'] ization) conv4_block9_0_relu (Activatio (None, 2, 2, 512) 0 ['conv4_block9_0_bn[0][0]'] n) conv4_block9_1_conv (Conv2D) (None, 2, 2, 128) 65536 ['conv4_block9_0_relu[0][0]'] conv4_block9_1_bn (BatchNormal (None, 2, 2, 128) 512 ['conv4_block9_1_conv[0][0]'] ization) conv4_block9_1_relu (Activatio (None, 2, 2, 128) 0 ['conv4_block9_1_bn[0][0]'] n) conv4_block9_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block9_1_relu[0][0]'] conv4_block9_concat (Concatena (None, 2, 2, 544) 0 ['conv4_block8_concat[0][0]', te) 'conv4_block9_2_conv[0][0]'] conv4_block10_0_bn (BatchNorma (None, 2, 2, 544) 2176 ['conv4_block9_concat[0][0]'] lization) conv4_block10_0_relu (Activati (None, 2, 2, 544) 0 ['conv4_block10_0_bn[0][0]'] on) conv4_block10_1_conv (Conv2D) (None, 2, 2, 128) 69632 ['conv4_block10_0_relu[0][0]'] conv4_block10_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block10_1_conv[0][0]'] lization) conv4_block10_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block10_1_bn[0][0]'] on) conv4_block10_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block10_1_relu[0][0]'] conv4_block10_concat (Concaten (None, 2, 2, 576) 0 ['conv4_block9_concat[0][0]', ate) 'conv4_block10_2_conv[0][0]'] conv4_block11_0_bn (BatchNorma (None, 2, 2, 576) 2304 ['conv4_block10_concat[0][0]'] lization) conv4_block11_0_relu (Activati (None, 2, 2, 576) 0 ['conv4_block11_0_bn[0][0]'] on) conv4_block11_1_conv (Conv2D) (None, 2, 2, 128) 73728 ['conv4_block11_0_relu[0][0]'] conv4_block11_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block11_1_conv[0][0]'] lization) conv4_block11_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block11_1_bn[0][0]'] on) conv4_block11_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block11_1_relu[0][0]'] conv4_block11_concat (Concaten (None, 2, 2, 608) 0 ['conv4_block10_concat[0][0]', ate) 'conv4_block11_2_conv[0][0]'] conv4_block12_0_bn (BatchNorma (None, 2, 2, 608) 2432 ['conv4_block11_concat[0][0]'] lization) conv4_block12_0_relu (Activati (None, 2, 2, 608) 0 ['conv4_block12_0_bn[0][0]'] on) conv4_block12_1_conv (Conv2D) (None, 2, 2, 128) 77824 ['conv4_block12_0_relu[0][0]'] conv4_block12_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block12_1_conv[0][0]'] lization) conv4_block12_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block12_1_bn[0][0]'] on) conv4_block12_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block12_1_relu[0][0]'] conv4_block12_concat (Concaten (None, 2, 2, 640) 0 ['conv4_block11_concat[0][0]', ate) 'conv4_block12_2_conv[0][0]'] conv4_block13_0_bn (BatchNorma (None, 2, 2, 640) 2560 ['conv4_block12_concat[0][0]'] lization) conv4_block13_0_relu (Activati (None, 2, 2, 640) 0 ['conv4_block13_0_bn[0][0]'] on) conv4_block13_1_conv (Conv2D) (None, 2, 2, 128) 81920 ['conv4_block13_0_relu[0][0]'] conv4_block13_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block13_1_conv[0][0]'] lization) conv4_block13_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block13_1_bn[0][0]'] on) conv4_block13_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block13_1_relu[0][0]'] conv4_block13_concat (Concaten (None, 2, 2, 672) 0 ['conv4_block12_concat[0][0]', ate) 'conv4_block13_2_conv[0][0]'] conv4_block14_0_bn (BatchNorma (None, 2, 2, 672) 2688 ['conv4_block13_concat[0][0]'] lization) conv4_block14_0_relu (Activati (None, 2, 2, 672) 0 ['conv4_block14_0_bn[0][0]'] on) conv4_block14_1_conv (Conv2D) (None, 2, 2, 128) 86016 ['conv4_block14_0_relu[0][0]'] conv4_block14_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block14_1_conv[0][0]'] lization) conv4_block14_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block14_1_bn[0][0]'] on) conv4_block14_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block14_1_relu[0][0]'] conv4_block14_concat (Concaten (None, 2, 2, 704) 0 ['conv4_block13_concat[0][0]', ate) 'conv4_block14_2_conv[0][0]'] conv4_block15_0_bn (BatchNorma (None, 2, 2, 704) 2816 ['conv4_block14_concat[0][0]'] lization) conv4_block15_0_relu (Activati (None, 2, 2, 704) 0 ['conv4_block15_0_bn[0][0]'] on) conv4_block15_1_conv (Conv2D) (None, 2, 2, 128) 90112 ['conv4_block15_0_relu[0][0]'] conv4_block15_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block15_1_conv[0][0]'] lization) conv4_block15_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block15_1_bn[0][0]'] on) conv4_block15_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block15_1_relu[0][0]'] conv4_block15_concat (Concaten (None, 2, 2, 736) 0 ['conv4_block14_concat[0][0]', ate) 'conv4_block15_2_conv[0][0]'] conv4_block16_0_bn (BatchNorma (None, 2, 2, 736) 2944 ['conv4_block15_concat[0][0]'] lization) conv4_block16_0_relu (Activati (None, 2, 2, 736) 0 ['conv4_block16_0_bn[0][0]'] on) conv4_block16_1_conv (Conv2D) (None, 2, 2, 128) 94208 ['conv4_block16_0_relu[0][0]'] conv4_block16_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block16_1_conv[0][0]'] lization) conv4_block16_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block16_1_bn[0][0]'] on) conv4_block16_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block16_1_relu[0][0]'] conv4_block16_concat (Concaten (None, 2, 2, 768) 0 ['conv4_block15_concat[0][0]', ate) 'conv4_block16_2_conv[0][0]'] conv4_block17_0_bn (BatchNorma (None, 2, 2, 768) 3072 ['conv4_block16_concat[0][0]'] lization) conv4_block17_0_relu (Activati (None, 2, 2, 768) 0 ['conv4_block17_0_bn[0][0]'] on) conv4_block17_1_conv (Conv2D) (None, 2, 2, 128) 98304 ['conv4_block17_0_relu[0][0]'] conv4_block17_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block17_1_conv[0][0]'] lization) conv4_block17_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block17_1_bn[0][0]'] on) conv4_block17_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block17_1_relu[0][0]'] conv4_block17_concat (Concaten (None, 2, 2, 800) 0 ['conv4_block16_concat[0][0]', ate) 'conv4_block17_2_conv[0][0]'] conv4_block18_0_bn (BatchNorma (None, 2, 2, 800) 3200 ['conv4_block17_concat[0][0]'] lization) conv4_block18_0_relu (Activati (None, 2, 2, 800) 0 ['conv4_block18_0_bn[0][0]'] on) conv4_block18_1_conv (Conv2D) (None, 2, 2, 128) 102400 ['conv4_block18_0_relu[0][0]'] conv4_block18_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block18_1_conv[0][0]'] lization) conv4_block18_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block18_1_bn[0][0]'] on) conv4_block18_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block18_1_relu[0][0]'] conv4_block18_concat (Concaten (None, 2, 2, 832) 0 ['conv4_block17_concat[0][0]', ate) 'conv4_block18_2_conv[0][0]'] conv4_block19_0_bn (BatchNorma (None, 2, 2, 832) 3328 ['conv4_block18_concat[0][0]'] lization) conv4_block19_0_relu (Activati (None, 2, 2, 832) 0 ['conv4_block19_0_bn[0][0]'] on) conv4_block19_1_conv (Conv2D) (None, 2, 2, 128) 106496 ['conv4_block19_0_relu[0][0]'] conv4_block19_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block19_1_conv[0][0]'] lization) conv4_block19_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block19_1_bn[0][0]'] on) conv4_block19_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block19_1_relu[0][0]'] conv4_block19_concat (Concaten (None, 2, 2, 864) 0 ['conv4_block18_concat[0][0]', ate) 'conv4_block19_2_conv[0][0]'] conv4_block20_0_bn (BatchNorma (None, 2, 2, 864) 3456 ['conv4_block19_concat[0][0]'] lization) conv4_block20_0_relu (Activati (None, 2, 2, 864) 0 ['conv4_block20_0_bn[0][0]'] on) conv4_block20_1_conv (Conv2D) (None, 2, 2, 128) 110592 ['conv4_block20_0_relu[0][0]'] conv4_block20_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block20_1_conv[0][0]'] lization) conv4_block20_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block20_1_bn[0][0]'] on) conv4_block20_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block20_1_relu[0][0]'] conv4_block20_concat (Concaten (None, 2, 2, 896) 0 ['conv4_block19_concat[0][0]', ate) 'conv4_block20_2_conv[0][0]'] conv4_block21_0_bn (BatchNorma (None, 2, 2, 896) 3584 ['conv4_block20_concat[0][0]'] lization) conv4_block21_0_relu (Activati (None, 2, 2, 896) 0 ['conv4_block21_0_bn[0][0]'] on) conv4_block21_1_conv (Conv2D) (None, 2, 2, 128) 114688 ['conv4_block21_0_relu[0][0]'] conv4_block21_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block21_1_conv[0][0]'] lization) conv4_block21_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block21_1_bn[0][0]'] on) conv4_block21_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block21_1_relu[0][0]'] conv4_block21_concat (Concaten (None, 2, 2, 928) 0 ['conv4_block20_concat[0][0]', ate) 'conv4_block21_2_conv[0][0]'] conv4_block22_0_bn (BatchNorma (None, 2, 2, 928) 3712 ['conv4_block21_concat[0][0]'] lization) conv4_block22_0_relu (Activati (None, 2, 2, 928) 0 ['conv4_block22_0_bn[0][0]'] on) conv4_block22_1_conv (Conv2D) (None, 2, 2, 128) 118784 ['conv4_block22_0_relu[0][0]'] conv4_block22_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block22_1_conv[0][0]'] lization) conv4_block22_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block22_1_bn[0][0]'] on) conv4_block22_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block22_1_relu[0][0]'] conv4_block22_concat (Concaten (None, 2, 2, 960) 0 ['conv4_block21_concat[0][0]', ate) 'conv4_block22_2_conv[0][0]'] conv4_block23_0_bn (BatchNorma (None, 2, 2, 960) 3840 ['conv4_block22_concat[0][0]'] lization) conv4_block23_0_relu (Activati (None, 2, 2, 960) 0 ['conv4_block23_0_bn[0][0]'] on) conv4_block23_1_conv (Conv2D) (None, 2, 2, 128) 122880 ['conv4_block23_0_relu[0][0]'] conv4_block23_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block23_1_conv[0][0]'] lization) conv4_block23_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block23_1_bn[0][0]'] on) conv4_block23_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block23_1_relu[0][0]'] conv4_block23_concat (Concaten (None, 2, 2, 992) 0 ['conv4_block22_concat[0][0]', ate) 'conv4_block23_2_conv[0][0]'] conv4_block24_0_bn (BatchNorma (None, 2, 2, 992) 3968 ['conv4_block23_concat[0][0]'] lization) conv4_block24_0_relu (Activati (None, 2, 2, 992) 0 ['conv4_block24_0_bn[0][0]'] on) conv4_block24_1_conv (Conv2D) (None, 2, 2, 128) 126976 ['conv4_block24_0_relu[0][0]'] conv4_block24_1_bn (BatchNorma (None, 2, 2, 128) 512 ['conv4_block24_1_conv[0][0]'] lization) conv4_block24_1_relu (Activati (None, 2, 2, 128) 0 ['conv4_block24_1_bn[0][0]'] on) conv4_block24_2_conv (Conv2D) (None, 2, 2, 32) 36864 ['conv4_block24_1_relu[0][0]'] conv4_block24_concat (Concaten (None, 2, 2, 1024) 0 ['conv4_block23_concat[0][0]', ate) 'conv4_block24_2_conv[0][0]'] pool4_bn (BatchNormalization) (None, 2, 2, 1024) 4096 ['conv4_block24_concat[0][0]'] pool4_relu (Activation) (None, 2, 2, 1024) 0 ['pool4_bn[0][0]'] pool4_conv (Conv2D) (None, 2, 2, 512) 524288 ['pool4_relu[0][0]'] pool4_pool (AveragePooling2D) (None, 1, 1, 512) 0 ['pool4_conv[0][0]'] conv5_block1_0_bn (BatchNormal (None, 1, 1, 512) 2048 ['pool4_pool[0][0]'] ization) conv5_block1_0_relu (Activatio (None, 1, 1, 512) 0 ['conv5_block1_0_bn[0][0]'] n) conv5_block1_1_conv (Conv2D) (None, 1, 1, 128) 65536 ['conv5_block1_0_relu[0][0]'] conv5_block1_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block1_1_conv[0][0]'] ization) conv5_block1_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block1_1_bn[0][0]'] n) conv5_block1_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block1_1_relu[0][0]'] conv5_block1_concat (Concatena (None, 1, 1, 544) 0 ['pool4_pool[0][0]', te) 'conv5_block1_2_conv[0][0]'] conv5_block2_0_bn (BatchNormal (None, 1, 1, 544) 2176 ['conv5_block1_concat[0][0]'] ization) conv5_block2_0_relu (Activatio (None, 1, 1, 544) 0 ['conv5_block2_0_bn[0][0]'] n) conv5_block2_1_conv (Conv2D) (None, 1, 1, 128) 69632 ['conv5_block2_0_relu[0][0]'] conv5_block2_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block2_1_conv[0][0]'] ization) conv5_block2_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block2_1_bn[0][0]'] n) conv5_block2_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block2_1_relu[0][0]'] conv5_block2_concat (Concatena (None, 1, 1, 576) 0 ['conv5_block1_concat[0][0]', te) 'conv5_block2_2_conv[0][0]'] conv5_block3_0_bn (BatchNormal (None, 1, 1, 576) 2304 ['conv5_block2_concat[0][0]'] ization) conv5_block3_0_relu (Activatio (None, 1, 1, 576) 0 ['conv5_block3_0_bn[0][0]'] n) conv5_block3_1_conv (Conv2D) (None, 1, 1, 128) 73728 ['conv5_block3_0_relu[0][0]'] conv5_block3_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block3_1_conv[0][0]'] ization) conv5_block3_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block3_1_bn[0][0]'] n) conv5_block3_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block3_1_relu[0][0]'] conv5_block3_concat (Concatena (None, 1, 1, 608) 0 ['conv5_block2_concat[0][0]', te) 'conv5_block3_2_conv[0][0]'] conv5_block4_0_bn (BatchNormal (None, 1, 1, 608) 2432 ['conv5_block3_concat[0][0]'] ization) conv5_block4_0_relu (Activatio (None, 1, 1, 608) 0 ['conv5_block4_0_bn[0][0]'] n) conv5_block4_1_conv (Conv2D) (None, 1, 1, 128) 77824 ['conv5_block4_0_relu[0][0]'] conv5_block4_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block4_1_conv[0][0]'] ization) conv5_block4_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block4_1_bn[0][0]'] n) conv5_block4_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block4_1_relu[0][0]'] conv5_block4_concat (Concatena (None, 1, 1, 640) 0 ['conv5_block3_concat[0][0]', te) 'conv5_block4_2_conv[0][0]'] conv5_block5_0_bn (BatchNormal (None, 1, 1, 640) 2560 ['conv5_block4_concat[0][0]'] ization) conv5_block5_0_relu (Activatio (None, 1, 1, 640) 0 ['conv5_block5_0_bn[0][0]'] n) conv5_block5_1_conv (Conv2D) (None, 1, 1, 128) 81920 ['conv5_block5_0_relu[0][0]'] conv5_block5_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block5_1_conv[0][0]'] ization) conv5_block5_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block5_1_bn[0][0]'] n) conv5_block5_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block5_1_relu[0][0]'] conv5_block5_concat (Concatena (None, 1, 1, 672) 0 ['conv5_block4_concat[0][0]', te) 'conv5_block5_2_conv[0][0]'] conv5_block6_0_bn (BatchNormal (None, 1, 1, 672) 2688 ['conv5_block5_concat[0][0]'] ization) conv5_block6_0_relu (Activatio (None, 1, 1, 672) 0 ['conv5_block6_0_bn[0][0]'] n) conv5_block6_1_conv (Conv2D) (None, 1, 1, 128) 86016 ['conv5_block6_0_relu[0][0]'] conv5_block6_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block6_1_conv[0][0]'] ization) conv5_block6_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block6_1_bn[0][0]'] n) conv5_block6_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block6_1_relu[0][0]'] conv5_block6_concat (Concatena (None, 1, 1, 704) 0 ['conv5_block5_concat[0][0]', te) 'conv5_block6_2_conv[0][0]'] conv5_block7_0_bn (BatchNormal (None, 1, 1, 704) 2816 ['conv5_block6_concat[0][0]'] ization) conv5_block7_0_relu (Activatio (None, 1, 1, 704) 0 ['conv5_block7_0_bn[0][0]'] n) conv5_block7_1_conv (Conv2D) (None, 1, 1, 128) 90112 ['conv5_block7_0_relu[0][0]'] conv5_block7_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block7_1_conv[0][0]'] ization) conv5_block7_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block7_1_bn[0][0]'] n) conv5_block7_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block7_1_relu[0][0]'] conv5_block7_concat (Concatena (None, 1, 1, 736) 0 ['conv5_block6_concat[0][0]', te) 'conv5_block7_2_conv[0][0]'] conv5_block8_0_bn (BatchNormal (None, 1, 1, 736) 2944 ['conv5_block7_concat[0][0]'] ization) conv5_block8_0_relu (Activatio (None, 1, 1, 736) 0 ['conv5_block8_0_bn[0][0]'] n) conv5_block8_1_conv (Conv2D) (None, 1, 1, 128) 94208 ['conv5_block8_0_relu[0][0]'] conv5_block8_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block8_1_conv[0][0]'] ization) conv5_block8_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block8_1_bn[0][0]'] n) conv5_block8_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block8_1_relu[0][0]'] conv5_block8_concat (Concatena (None, 1, 1, 768) 0 ['conv5_block7_concat[0][0]', te) 'conv5_block8_2_conv[0][0]'] conv5_block9_0_bn (BatchNormal (None, 1, 1, 768) 3072 ['conv5_block8_concat[0][0]'] ization) conv5_block9_0_relu (Activatio (None, 1, 1, 768) 0 ['conv5_block9_0_bn[0][0]'] n) conv5_block9_1_conv (Conv2D) (None, 1, 1, 128) 98304 ['conv5_block9_0_relu[0][0]'] conv5_block9_1_bn (BatchNormal (None, 1, 1, 128) 512 ['conv5_block9_1_conv[0][0]'] ization) conv5_block9_1_relu (Activatio (None, 1, 1, 128) 0 ['conv5_block9_1_bn[0][0]'] n) conv5_block9_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block9_1_relu[0][0]'] conv5_block9_concat (Concatena (None, 1, 1, 800) 0 ['conv5_block8_concat[0][0]', te) 'conv5_block9_2_conv[0][0]'] conv5_block10_0_bn (BatchNorma (None, 1, 1, 800) 3200 ['conv5_block9_concat[0][0]'] lization) conv5_block10_0_relu (Activati (None, 1, 1, 800) 0 ['conv5_block10_0_bn[0][0]'] on) conv5_block10_1_conv (Conv2D) (None, 1, 1, 128) 102400 ['conv5_block10_0_relu[0][0]'] conv5_block10_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block10_1_conv[0][0]'] lization) conv5_block10_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block10_1_bn[0][0]'] on) conv5_block10_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block10_1_relu[0][0]'] conv5_block10_concat (Concaten (None, 1, 1, 832) 0 ['conv5_block9_concat[0][0]', ate) 'conv5_block10_2_conv[0][0]'] conv5_block11_0_bn (BatchNorma (None, 1, 1, 832) 3328 ['conv5_block10_concat[0][0]'] lization) conv5_block11_0_relu (Activati (None, 1, 1, 832) 0 ['conv5_block11_0_bn[0][0]'] on) conv5_block11_1_conv (Conv2D) (None, 1, 1, 128) 106496 ['conv5_block11_0_relu[0][0]'] conv5_block11_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block11_1_conv[0][0]'] lization) conv5_block11_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block11_1_bn[0][0]'] on) conv5_block11_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block11_1_relu[0][0]'] conv5_block11_concat (Concaten (None, 1, 1, 864) 0 ['conv5_block10_concat[0][0]', ate) 'conv5_block11_2_conv[0][0]'] conv5_block12_0_bn (BatchNorma (None, 1, 1, 864) 3456 ['conv5_block11_concat[0][0]'] lization) conv5_block12_0_relu (Activati (None, 1, 1, 864) 0 ['conv5_block12_0_bn[0][0]'] on) conv5_block12_1_conv (Conv2D) (None, 1, 1, 128) 110592 ['conv5_block12_0_relu[0][0]'] conv5_block12_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block12_1_conv[0][0]'] lization) conv5_block12_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block12_1_bn[0][0]'] on) conv5_block12_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block12_1_relu[0][0]'] conv5_block12_concat (Concaten (None, 1, 1, 896) 0 ['conv5_block11_concat[0][0]', ate) 'conv5_block12_2_conv[0][0]'] conv5_block13_0_bn (BatchNorma (None, 1, 1, 896) 3584 ['conv5_block12_concat[0][0]'] lization) conv5_block13_0_relu (Activati (None, 1, 1, 896) 0 ['conv5_block13_0_bn[0][0]'] on) conv5_block13_1_conv (Conv2D) (None, 1, 1, 128) 114688 ['conv5_block13_0_relu[0][0]'] conv5_block13_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block13_1_conv[0][0]'] lization) conv5_block13_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block13_1_bn[0][0]'] on) conv5_block13_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block13_1_relu[0][0]'] conv5_block13_concat (Concaten (None, 1, 1, 928) 0 ['conv5_block12_concat[0][0]', ate) 'conv5_block13_2_conv[0][0]'] conv5_block14_0_bn (BatchNorma (None, 1, 1, 928) 3712 ['conv5_block13_concat[0][0]'] lization) conv5_block14_0_relu (Activati (None, 1, 1, 928) 0 ['conv5_block14_0_bn[0][0]'] on) conv5_block14_1_conv (Conv2D) (None, 1, 1, 128) 118784 ['conv5_block14_0_relu[0][0]'] conv5_block14_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block14_1_conv[0][0]'] lization) conv5_block14_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block14_1_bn[0][0]'] on) conv5_block14_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block14_1_relu[0][0]'] conv5_block14_concat (Concaten (None, 1, 1, 960) 0 ['conv5_block13_concat[0][0]', ate) 'conv5_block14_2_conv[0][0]'] conv5_block15_0_bn (BatchNorma (None, 1, 1, 960) 3840 ['conv5_block14_concat[0][0]'] lization) conv5_block15_0_relu (Activati (None, 1, 1, 960) 0 ['conv5_block15_0_bn[0][0]'] on) conv5_block15_1_conv (Conv2D) (None, 1, 1, 128) 122880 ['conv5_block15_0_relu[0][0]'] conv5_block15_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block15_1_conv[0][0]'] lization) conv5_block15_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block15_1_bn[0][0]'] on) conv5_block15_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block15_1_relu[0][0]'] conv5_block15_concat (Concaten (None, 1, 1, 992) 0 ['conv5_block14_concat[0][0]', ate) 'conv5_block15_2_conv[0][0]'] conv5_block16_0_bn (BatchNorma (None, 1, 1, 992) 3968 ['conv5_block15_concat[0][0]'] lization) conv5_block16_0_relu (Activati (None, 1, 1, 992) 0 ['conv5_block16_0_bn[0][0]'] on) conv5_block16_1_conv (Conv2D) (None, 1, 1, 128) 126976 ['conv5_block16_0_relu[0][0]'] conv5_block16_1_bn (BatchNorma (None, 1, 1, 128) 512 ['conv5_block16_1_conv[0][0]'] lization) conv5_block16_1_relu (Activati (None, 1, 1, 128) 0 ['conv5_block16_1_bn[0][0]'] on) conv5_block16_2_conv (Conv2D) (None, 1, 1, 32) 36864 ['conv5_block16_1_relu[0][0]'] conv5_block16_concat (Concaten (None, 1, 1, 1024) 0 ['conv5_block15_concat[0][0]', ate) 'conv5_block16_2_conv[0][0]'] bn (BatchNormalization) (None, 1, 1, 1024) 4096 ['conv5_block16_concat[0][0]'] relu (Activation) (None, 1, 1, 1024) 0 ['bn[0][0]'] ================================================================================================== Total params: 7,037,504 Trainable params: 6,953,856 Non-trainable params: 83,648 __________________________________________________________________________________________________
Since we are using the Densenet as a architecture with our custom dataset so we have to add our custom dense layer so that we can classify the objects from the datasets objects the snippet is mentioned below:
Since we have loaded the model in our environment with our configuration of the layers its time to set the training parameters of each of the layer to non-trainable. This step will deactivate the backward propagating strep in the mentioned model as a a result we will extract the features based on the model which was trained on the ImageNet dataset. The code if mentioned below:
for i,layer in enumerate(baseModel.layers): #Line 5
layer.trainable=False #Line 6
print(“Layer Number :”,i, “Layer Name :”, layer.name, “Layer
Shape(Input_Shape,Output Shape) : (“,layer.input_shape,
layer.output_shape, “) is Trainable:”, layer.trainable,”No of
Parameter :”,layer.count_params()) #Line 7
Line 5: This snippet allows us to iterate through the model layer using for loop.
Line 6: This snippets is used to set the trainable parameter of each layer to False by layer.trainable=False .
Line 7: This snippets prints the layer information as shown below.
Layer Number : 26 Layer Name : block_2_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 56, 56, 24), (None, 56, 56, 24)] (None, 56, 56, 24) ) is Trainable: True No of Parameter : 0
Layer Number : 27 Layer Name : block_3_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 24) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 3456
Layer Number : 28 Layer Name : block_3_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 576
Layer Number : 29 Layer Name : block_3_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 0
Layer Number : 30 Layer Name : block_3_pad Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 57, 57, 144) ) is Trainable: True No of Parameter : 0
Layer Number : 31 Layer Name : block_3_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 57, 57, 144) (None, 28, 28, 144) ) is Trainable: True No of Parameter : 1296
Layer Number : 32 Layer Name : block_3_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 144) (None, 28, 28, 144) ) is Trainable: True No of Parameter : 576
Layer Number : 33 Layer Name : block_3_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 144) (None, 28, 28, 144) ) is Trainable: True No of Parameter : 0
Layer Number : 34 Layer Name : block_3_project Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 144) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 4608
Layer Number : 35 Layer Name : block_3_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 128
Layer Number : 36 Layer Name : block_4_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 6144
Layer Number : 37 Layer Name : block_4_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 38 Layer Name : block_4_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 39 Layer Name : block_4_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 1728
Layer Number : 40 Layer Name : block_4_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 41 Layer Name : block_4_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 42 Layer Name : block_4_project Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 6144
Layer Number : 43 Layer Name : block_4_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 128
Layer Number : 44 Layer Name : block_4_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 28, 28, 32), (None, 28, 28, 32)] (None, 28, 28, 32) ) is Trainable: True No of Parameter : 0
Layer Number : 45 Layer Name : block_5_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 6144
Layer Number : 46 Layer Name : block_5_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 47 Layer Name : block_5_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 48 Layer Name : block_5_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 1728
Layer Number : 49 Layer Name : block_5_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 50 Layer Name : block_5_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 51 Layer Name : block_5_project Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 6144
Layer Number : 52 Layer Name : block_5_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 32) ) is Trainable: True No of Parameter : 128
Layer Number : 53 Layer Name : block_5_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 28, 28, 32), (None, 28, 28, 32)] (None, 28, 28, 32) ) is Trainable: True No of Parameter : 0
Layer Number : 54 Layer Name : block_6_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 32) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 6144
Layer Number : 55 Layer Name : block_6_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 56 Layer Name : block_6_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 28, 28, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 57 Layer Name : block_6_pad Layer Shape(Input_Shape,Output Shape) : ( (None, 28, 28, 192) (None, 29, 29, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 58 Layer Name : block_6_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 29, 29, 192) (None, 14, 14, 192) ) is Trainable: True No of Parameter : 1728
Layer Number : 59 Layer Name : block_6_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 192) (None, 14, 14, 192) ) is Trainable: True No of Parameter : 768
Layer Number : 60 Layer Name : block_6_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 192) (None, 14, 14, 192) ) is Trainable: True No of Parameter : 0
Layer Number : 61 Layer Name : block_6_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 192) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 12288
Layer Number : 62 Layer Name : block_6_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 256
Layer Number : 63 Layer Name : block_7_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 24576
Layer Number : 64 Layer Name : block_7_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 65 Layer Name : block_7_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 66 Layer Name : block_7_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 3456
Layer Number : 67 Layer Name : block_7_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 68 Layer Name : block_7_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 69 Layer Name : block_7_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 24576
Layer Number : 70 Layer Name : block_7_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 256
Layer Number : 71 Layer Name : block_7_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 14, 14, 64), (None, 14, 14, 64)] (None, 14, 14, 64) ) is Trainable: True No of Parameter : 0
Layer Number : 72 Layer Name : block_8_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 24576
Layer Number : 73 Layer Name : block_8_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 74 Layer Name : block_8_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 75 Layer Name : block_8_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 3456
Layer Number : 76 Layer Name : block_8_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 77 Layer Name : block_8_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 78 Layer Name : block_8_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 24576
Layer Number : 79 Layer Name : block_8_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 256
Layer Number : 80 Layer Name : block_8_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 14, 14, 64), (None, 14, 14, 64)] (None, 14, 14, 64) ) is Trainable: True No of Parameter : 0
Layer Number : 81 Layer Name : block_9_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 24576
Layer Number : 82 Layer Name : block_9_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 83 Layer Name : block_9_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 84 Layer Name : block_9_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 3456
Layer Number : 85 Layer Name : block_9_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 86 Layer Name : block_9_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 87 Layer Name : block_9_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 24576
Layer Number : 88 Layer Name : block_9_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 64) ) is Trainable: True No of Parameter : 256
Layer Number : 89 Layer Name : block_9_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 14, 14, 64), (None, 14, 14, 64)] (None, 14, 14, 64) ) is Trainable: True No of Parameter : 0
Layer Number : 90 Layer Name : block_10_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 64) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 24576
Layer Number : 91 Layer Name : block_10_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 92 Layer Name : block_10_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 93 Layer Name : block_10_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 3456
Layer Number : 94 Layer Name : block_10_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 1536
Layer Number : 95 Layer Name : block_10_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 384) ) is Trainable: True No of Parameter : 0
Layer Number : 96 Layer Name : block_10_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 384) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 36864
Layer Number : 97 Layer Name : block_10_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 384
Layer Number : 98 Layer Name : block_11_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 55296
Layer Number : 99 Layer Name : block_11_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 100 Layer Name : block_11_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 101 Layer Name : block_11_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 5184
Layer Number : 102 Layer Name : block_11_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 103 Layer Name : block_11_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 104 Layer Name : block_11_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 55296
Layer Number : 105 Layer Name : block_11_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 384
Layer Number : 106 Layer Name : block_11_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 14, 14, 96), (None, 14, 14, 96)] (None, 14, 14, 96) ) is Trainable: True No of Parameter : 0
Layer Number : 107 Layer Name : block_12_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 55296
Layer Number : 108 Layer Name : block_12_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 109 Layer Name : block_12_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 110 Layer Name : block_12_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 5184
Layer Number : 111 Layer Name : block_12_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 112 Layer Name : block_12_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 113 Layer Name : block_12_project Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 55296
Layer Number : 114 Layer Name : block_12_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 96) ) is Trainable: True No of Parameter : 384
Layer Number : 115 Layer Name : block_12_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 14, 14, 96), (None, 14, 14, 96)] (None, 14, 14, 96) ) is Trainable: True No of Parameter : 0
Layer Number : 116 Layer Name : block_13_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 96) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 55296
Layer Number : 117 Layer Name : block_13_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 118 Layer Name : block_13_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 14, 14, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 119 Layer Name : block_13_pad Layer Shape(Input_Shape,Output Shape) : ( (None, 14, 14, 576) (None, 15, 15, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 120 Layer Name : block_13_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 15, 15, 576) (None, 7, 7, 576) ) is Trainable: True No of Parameter : 5184
Layer Number : 121 Layer Name : block_13_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 576) (None, 7, 7, 576) ) is Trainable: True No of Parameter : 2304
Layer Number : 122 Layer Name : block_13_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 576) (None, 7, 7, 576) ) is Trainable: True No of Parameter : 0
Layer Number : 123 Layer Name : block_13_project Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 576) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 92160
Layer Number : 124 Layer Name : block_13_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 640
Layer Number : 125 Layer Name : block_14_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 153600
Layer Number : 126 Layer Name : block_14_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 127 Layer Name : block_14_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 128 Layer Name : block_14_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 8640
Layer Number : 129 Layer Name : block_14_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 130 Layer Name : block_14_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 131 Layer Name : block_14_project Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 153600
Layer Number : 132 Layer Name : block_14_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 640
Layer Number : 133 Layer Name : block_14_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 7, 7, 160), (None, 7, 7, 160)] (None, 7, 7, 160) ) is Trainable: True No of Parameter : 0
Layer Number : 134 Layer Name : block_15_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 153600
Layer Number : 135 Layer Name : block_15_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 136 Layer Name : block_15_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 137 Layer Name : block_15_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 8640
Layer Number : 138 Layer Name : block_15_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 139 Layer Name : block_15_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 140 Layer Name : block_15_project Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 153600
Layer Number : 141 Layer Name : block_15_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 160) ) is Trainable: True No of Parameter : 640
Layer Number : 142 Layer Name : block_15_add Layer Shape(Input_Shape,Output Shape) : ( [(None, 7, 7, 160), (None, 7, 7, 160)] (None, 7, 7, 160) ) is Trainable: True No of Parameter : 0
Layer Number : 143 Layer Name : block_16_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 160) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 153600
Layer Number : 144 Layer Name : block_16_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 145 Layer Name : block_16_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 146 Layer Name : block_16_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 8640
Layer Number : 147 Layer Name : block_16_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 3840
Layer Number : 148 Layer Name : block_16_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 960) ) is Trainable: True No of Parameter : 0
Layer Number : 149 Layer Name : block_16_project Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 960) (None, 7, 7, 320) ) is Trainable: True No of Parameter : 307200
Layer Number : 150 Layer Name : block_16_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 320) (None, 7, 7, 320) ) is Trainable: True No of Parameter : 1280
Layer Number : 151 Layer Name : Conv_1 Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 320) (None, 7, 7, 1280) ) is Trainable: True No of Parameter : 409600
Layer Number : 152 Layer Name : Conv_1_bn Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 1280) (None, 7, 7, 1280) ) is Trainable: True No of Parameter : 5120
Layer Number : 153 Layer Name : out_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 1280) (None, 7, 7, 1280) ) is Trainable: True No of Parameter : 0
Layer Number : 154 Layer Name : global_average_pooling2d Layer Shape(Input_Shape,Output Shape) : ( (None, 7, 7, 1280) (None, 1280) ) is Trainable: True No of Parameter : 0
Layer Number : 155 Layer Name : predictions Layer Shape(Input_Shape,Output Shape) : ( (None, 1280) (None, 1000) ) is Trainable: True No of Parameter : 1281000
Now we have to compile the model which is shown below:
base_learning_rate = 0.0001 #Line 8
baseModel.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=base_learning_rate),loss=tf.keras.losses.CategoricalCrossentropy(),metrics=[‘accuracy’]) #Line 9
Line 8 : We have set the learning rate for the optimiser i.e. 0.0001
Line 9: In this snippet we have selected our desired parameters such as accuracy, Optimiser : Adam, Loss: CategoricalCrossentrophy.
Finally we have to predict i.e. get the feature from the model which is shown as below:
Features_train= baseModel.predict(trainX) #Line 10
This will give us the output of features from the image , the Feature variable will be of shape (No_of samples,1,1,2048) and for the training set it will be of (50000,1,1,2048), for test set it will be of (10000,1,1,2048) size.
If you want to have the insight of the visualization library please follow the below mention article series:
In this article we have discussed about the Densenet architechture with Keras as a As a feature Extraction model. In next article,we will have hands on experience with Keras as a Using Pre-trained models DENSENET architecture..
Stay Tuned !!! Happy Learning :)
Special Thanks:
As we say “Car is useless if it doesn’t have a good engine” similarly student is useless without proper guidance and motivation. I will like to thank my Guru as well as my Idol “Dr. P. Supraja” and “A. Helen Victoria”- guided me throughout the journey, from the bottom of my heart. As a Guru, she has lighted the best available path for me, motivated me whenever I encountered failure or roadblock- without her support and motivation this was an impossible task for me.
References
Pytorch: Link
Keras: Link
Tensorflow: Link
if you have any query feel free to contact me with any of the -below mentioned options:
YouTube : Link
Website: www.rstiwari.com
Medium: https://tiwari11-rst.medium.com
Github Pages: https://happyman11.github.io/