Transfer Learning — Part — 7.2!! Fine Tunning 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.

Figure.1 Transfer Learning

It is also advisable to go through the article of Densenet before reading this article which is mentioned below:

As I have mentioned above, we will discuss implementation of the pre-trained Densenet model in 4 ways which are as follows:

  1. As a feature Extraction model.
  2. Using Pre-trained models Densenet architecture.
  3. Fine tunning Pre-trained models Densenet architecture.
  4. Using Pre-trained model weights as a weight initialiser.

So without any further delay lets start our implementation in Keras :).

1. Fine tunning Pre-trained models Densenet architecture.

In this section we will see how we can implement Densenet as a architecture in Keras. We will use state of the art Densenet network architecture with weight i.e. weights of the pre-trained model will be freezed i.e. error will not be propagated backward to these layers whereas custom fully connected layers will we optimised according to our dataset i.e. they will be trainable.The code is explained below:

1.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 4for 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:

Figure 2. Sample CIFDAR-10 dataset

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.

1.3.2. Densenet Fine Tunning Dense Layer

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 no weight by specifying weights=None, 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 ti 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_3 (InputLayer) [(None, 32, 32, 3)] 0 []

zero_padding2d_4 (ZeroPadding2 (None, 38, 38, 3) 0 ['input_3[0][0]']
D)

conv1/conv (Conv2D) (None, 16, 16, 64) 9408 ['zero_padding2d_4[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_5 (ZeroPadding2 (None, 18, 18, 64) 0 ['conv1/relu[0][0]']
D)

pool1 (MaxPooling2D) (None, 8, 8, 64) 0 ['zero_padding2d_5[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 : 0 Layer Name : input_1 Layer Shape(Input_Shape,Output Shape) : ( [(None, 224, 224, 3)] [(None, 224, 224, 3)] ) is Trainable: True No of Parameter : 0
Layer Number : 1 Layer Name : Conv1 Layer Shape(Input_Shape,Output Shape) : ( (None, 224, 224, 3) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 864
Layer Number : 2 Layer Name : bn_Conv1 Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 128
Layer Number : 3 Layer Name : Conv1_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 0
Layer Number : 4 Layer Name : expanded_conv_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 288
Layer Number : 5 Layer Name : expanded_conv_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 128
Layer Number : 6 Layer Name : expanded_conv_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 32) ) is Trainable: True No of Parameter : 0
Layer Number : 7 Layer Name : expanded_conv_project Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 32) (None, 112, 112, 16) ) is Trainable: True No of Parameter : 512
Layer Number : 8 Layer Name : expanded_conv_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 16) (None, 112, 112, 16) ) is Trainable: True No of Parameter : 64
Layer Number : 9 Layer Name : block_1_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 16) (None, 112, 112, 96) ) is Trainable: True No of Parameter : 1536
Layer Number : 10 Layer Name : block_1_expand_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 96) (None, 112, 112, 96) ) is Trainable: True No of Parameter : 384
Layer Number : 11 Layer Name : block_1_expand_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 96) (None, 112, 112, 96) ) is Trainable: True No of Parameter : 0
Layer Number : 12 Layer Name : block_1_pad Layer Shape(Input_Shape,Output Shape) : ( (None, 112, 112, 96) (None, 113, 113, 96) ) is Trainable: True No of Parameter : 0
Layer Number : 13 Layer Name : block_1_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 113, 113, 96) (None, 56, 56, 96) ) is Trainable: True No of Parameter : 864
Layer Number : 14 Layer Name : block_1_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 96) (None, 56, 56, 96) ) is Trainable: True No of Parameter : 384
Layer Number : 15 Layer Name : block_1_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 96) (None, 56, 56, 96) ) is Trainable: True No of Parameter : 0
Layer Number : 16 Layer Name : block_1_project Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 96) (None, 56, 56, 24) ) is Trainable: True No of Parameter : 2304
Layer Number : 17 Layer Name : block_1_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 24) (None, 56, 56, 24) ) is Trainable: True No of Parameter : 96
Layer Number : 18 Layer Name : block_2_expand Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 24) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 3456
Layer Number : 19 Layer Name : block_2_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 : 20 Layer Name : block_2_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 : 21 Layer Name : block_2_depthwise Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 1296
Layer Number : 22 Layer Name : block_2_depthwise_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 576
Layer Number : 23 Layer Name : block_2_depthwise_relu Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 144) ) is Trainable: True No of Parameter : 0
Layer Number : 24 Layer Name : block_2_project Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 144) (None, 56, 56, 24) ) is Trainable: True No of Parameter : 3456
Layer Number : 25 Layer Name : block_2_project_BN Layer Shape(Input_Shape,Output Shape) : ( (None, 56, 56, 24) (None, 56, 56, 24) ) is Trainable: True No of Parameter : 96
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

Since we are using the Densenet as a architechture with our custom dastaset 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:

FC_layer_Flatten = tf.keras.layers.Flatten()(baseModel.output)        #Line 5
Dense=tf.keras.layers.Dense(units=1000,activation=”relu”)(FC_layer_Flatten) #Line 6
Dense=tf.keras.layers.Dense(units=800,activation=”relu”)(Dense)#Line 7
Dense=tf.keras.layers.Dense(units=400,activation=”relu”)(Dense)#Line 8
Dense=tf.keras.layers.Dense(units=200,activation=”relu”)(Dense) #Line 9
Dense=tf.keras.layers.Dense(units=100,activation=”relu”)(Dense)#Line 10
Classification=tf.keras.layers.Dense(units=10,activation=”softmax”)(Dense) #Line 11

Line 5: This line is used to flatten the layer of the Densenet network, already we have output as a form of 1d-tensor, then also i have flatten it for demonstration purpose , which will feed into further layer.

Line 6 to Line 10: These followoing mentioned line are artificial neural network with relu activation.

Line 11: The line has 10 neurons with Softmax activation fuction which allow us to predict the probabolities of each classes đrom the neural network.

model_final = tf.keras.Model(inputs=image_input,outputs=Classification) #Line 12
model_final.summary() #Line 13

Line 12: This line is used to create the custom model which has Densenet architechture as well as our custom fully classification layer. We have specified our input layer as image_input and output layer as Classification so that the model is aware of the input and output layer to do further calculations.

Line 13: This snippets shows the full summary of the model which is shown below:

Model: "model_1"
__________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
==================================================================================================
input_3 (InputLayer) [(None, 32, 32, 3)] 0 []

zero_padding2d_4 (ZeroPadding2 (None, 38, 38, 3) 0 ['input_3[0][0]']
D)

conv1/conv (Conv2D) (None, 16, 16, 64) 9408 ['zero_padding2d_4[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_5 (ZeroPadding2 (None, 18, 18, 64) 0 ['conv1/relu[0][0]']
D)

pool1 (MaxPooling2D) (None, 8, 8, 64) 0 ['zero_padding2d_5[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]']

flatten_1 (Flatten) (None, 1024) 0 ['relu[0][0]']

dense_6 (Dense) (None, 1000) 1025000 ['flatten_1[0][0]']

dense_7 (Dense) (None, 800) 800800 ['dense_6[0][0]']

dense_8 (Dense) (None, 400) 320400 ['dense_7[0][0]']

dense_9 (Dense) (None, 200) 80200 ['dense_8[0][0]']

dense_10 (Dense) (None, 100) 20100 ['dense_9[0][0]']

dense_11 (Dense) (None, 10) 1010 ['dense_10[0][0]']

==================================================================================================
Total params: 9,285,014
Trainable params: 9,201,366
Non-trainable params: 83,648

Now we have to compile the model which is shown below:

base_learning_rate = 0.0001  #Line 13
model_final.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=base_learning_rate),loss=tf.keras.losses.CategoricalCrossentropy(),metrics=['accuracy']) #Line 14

Line 13: We have set the learning rate for the optimiser i.e. 0.0001

Line 14: In this snippet we have selected our desired parameters such as accuracy, Optimiser : ADam, Loss: CategoricalCrossentrophy.

Finally we can train and predict the model by using the following snippets:

history = model_final.fit(trainX,trainY,epochs=10,batch_size=32,validation_data=(testX, testY))     #Line 15
prediction=model_final.predict(testX) #Line 16

Line 15: This snippet is used to train the model on train datasets.

Line 16: This snippet is used to predict from the model on test datasets

Note: In this section we have set the parameter of the Densenet to false i.e. the loss will not backward propagated through these layers where as the fully connected layer are custom defined by us the loss will be backward propagated through fully connected layer.

In this article we have discussed about the Fine tuning Densenet architechture with Keras. In next article,we will have hands on experience with Densenet as an architechture in Keras.

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

Portfolio: https://portfolio.rstiwari.com/

Articles: https://laptrinhx.com/author/ravi-shekhar-tiwari/

--

--

Profile: www.rstiwari.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store