def topmodel(model, h):
"""
n_dense and p_dropout are used
"""
n_dense = model.n_dense
p_dropout = model.p_dropout
h = GlobalAveragePooling2D()(h)
h = Dense(n_dense)(h)
h = BatchNormalization()(h)
h = Activation('relu')(h)
h = Dropout(p_dropout)(h)
return h
评论列表
文章目录