def vgg16():
base_model = VGG16(weights=None, include_top=False, input_shape = (224,224,3))
# Classification block
x = Flatten(name='flatten', input_shape=base_model.output_shape[1:])(base_model.output)
x = Dense(512, activation='relu', name='fc1')(x)
x = Dense(512, activation='relu', name='fc2')(x)
x = Dense(17, activation='softmax', name='predictions')(x)
model = Model(inputs=base_model.input, outputs=x)
return model
评论列表
文章目录