def CNN(input_shape=None, classes=1000):
inputs = Input(shape=input_shape)
# Block 1
x = GaussianNoise(0.3)(inputs)
x = CBRD(x, 64)
x = CBRD(x, 64)
x = MaxPooling2D()(x)
# Block 2
x = CBRD(x, 128)
x = CBRD(x, 128)
x = MaxPooling2D()(x)
# Block 3
x = CBRD(x, 256)
x = CBRD(x, 256)
x = CBRD(x, 256)
x = MaxPooling2D()(x)
# Classification block
x = Flatten(name='flatten')(x)
x = DBRD(x, 4096)
x = DBRD(x, 4096)
x = Dense(classes, activation='softmax', name='predictions')(x)
model = Model(inputs=inputs, outputs=x)
return model
评论列表
文章目录