def get_modified_vgg19():
model = vgg19.VGG19(weights = 'imagenet', include_top = True)
for x in range(20):
model.layers.pop()
x = UpSampling2D()(model.layers[-1].ouput)
x = Deconv2D(64, (3,3), padding = 'same', activation = 'relu')(x)
x = Deconv2D(3, (1,1), padding = 'same', activation = None)(x)
mod = keras.models.Model(input = model.input, output = x)
adam = Adam(lr=0.005, beta_1=0.9, beta_2=0.999, epsilon=1e-08, decay=3e-06)
mod.compile(loss='mse', optimizer = adam)
return mod
评论列表
文章目录