앞서 생성한 클래스(VGG19)를 호출하여 VGG19라는 모델을 생성합니다. 이때 VGG19 클래스에 전달되는 입력 값은 (224,224,3)의 형태를 갖습니다.
코드 6-16 VGG19 모델 출력
model = VGG19(input_shape=(224,224,3))
model.summary()
다음은 VGG19 모델의 출력 결과입니다.
Model: "vg_g19"
________________________________________________________________
Layer (type) Output Shape Param #
================================================================
conv2d (Conv2D) (None, 224, 224, 64) 1792
________________________________________________________________
conv2d_1 (Conv2D) (None, 224, 224, 64) 36928
________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 112, 112, 64) 0
________________________________________________________________
conv2d_2 (Conv2D) (None, 112, 112, 128) 73856
________________________________________________________________
conv2d_3 (Conv2D) (None, 112, 112, 128) 147584
________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 56, 56, 128) 0
________________________________________________________________
conv2d_4 (Conv2D) (None, 56, 56, 256) 295168
________________________________________________________________
conv2d_5 (Conv2D) (None, 56, 56, 256) 590080
________________________________________________________________
conv2d_6 (Conv2D) (None, 56, 56, 256) 590080
________________________________________________________________
conv2d_7 (Conv2D) (None, 56, 56, 256) 590080
________________________________________________________________
max_pooling2d_2 (MaxPooling2 (None, 28, 28, 256) 0
________________________________________________________________
conv2d_8 (Conv2D) (None, 28, 28, 512) 1180160
________________________________________________________________
conv2d_9 (Conv2D) (None, 28, 28, 512) 2359808
________________________________________________________________
conv2d_10 (Conv2D) (None, 28, 28, 512) 2359808
________________________________________________________________
conv2d_11 (Conv2D) (None, 28, 28, 512) 2359808
________________________________________________________________
max_pooling2d_3 (MaxPooling2 (None, 14, 14, 512) 0
________________________________________________________________
conv2d_12 (Conv2D) (None, 14, 14, 512) 2359808
________________________________________________________________
conv2d_13 (Conv2D) (None, 14, 14, 512) 2359808
________________________________________________________________
conv2d_14 (Conv2D) (None, 14, 14, 512) 2359808
________________________________________________________________
conv2d_15 (Conv2D) (None, 14, 14, 512) 2359808
________________________________________________________________
max_pooling2d_4 (MaxPooling2 (None, 7, 7, 512) 0
________________________________________________________________
flatten (Flatten) (None, 25088) 0
________________________________________________________________
dense (Dense) (None, 4096) 102764544
________________________________________________________________
dropout (Dropout) (None, 4096) 0
________________________________________________________________
dense_1 (Dense) (None, 4096) 16781312
________________________________________________________________
dropout_1 (Dropout) (None, 4096) 0
________________________________________________________________
dense_2 (Dense) (None, 1000) 4097000
================================================================
Total params: 143,667,240
Trainable params: 143,667,240
Non-trainable params: 0
________________________________________________________________