def build_model():
resnet50 = ResNet50(weights='imagenet', include_top=False)
xception = Xception(weights='imagenet', include_top=False)
vgg16 = VGG16(weights='imagenet', include_top=False)
input = Input(shape=(SIZE, SIZE, N_ch))
x = Conv2D(3, (3, 3), padding='same')(input)
x = resnet50(x)
x = xception(x)
x = vgg16(x)
x = GlobalAveragePooling2D()(x)
x = BatchNormalization()(x)
x = Dropout(0.5)(x)
x = Dense(256, activation='relu')(x)
x = BatchNormalization()(x)
x = Dropout(0.5)(x)
output = Dense(2, activation='softmax', name='root')(x)
model = Model(input, output)
optimizer = Adam(lr=0.003, beta_1=0.9, beta_2=0.999,
epsilon=0.1, decay=0.0)
model.compile(loss='categorical_crossentropy',
optimizer=optimizer, metrics=['accuracy'])
model.summary()
return model