def get_model(num_class):
    base_model = VGG16(weights='imagenet', include_top=False, input_shape=[input_size, input_size, 3], classes=1)
    x = base_model.get_layer('block5_pool').output
    x = GlobalMaxPooling2D()(x)
    x = Dense(512, activation='relu', name='fc2')(x)
    x = Dropout(0.3)(x)
    x = Dense(512, activation='relu', name='fc3')(x)
    x = Dropout(0.3)(x)
    predictions = Dense(num_class, activation='softmax')(x)
    model = Model(inputs=base_model.input, outputs=predictions)
    sgd = SGD(lr=0.001, decay=1e-06, momentum=0.9, nesterov=True)
    model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])
    return model
def get_model(num_class):
    base_model = VGG16(weights='imagenet', include_top=False, input_shape=[input_size, input_size, 3], classes=1)
    x = base_model.get_layer('block5_pool').output
    x = GlobalMaxPooling2D()(x)
    x = Dense(512, activation='relu', name='fc2')(x)
    x = Dropout(0.3)(x)
    x = Dense(512, activation='relu', name='fc3')(x)
    x = Dropout(0.3)(x)
    predictions = Dense(num_class, activation='softmax')(x)
    model = Model(inputs=base_model.input, outputs=predictions)
    sgd = SGD(lr=0.001, decay=1e-06, momentum=0.9, nesterov=True)
    model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])
    return model