MCPcopy
hub / github.com/tdeboissiere/DeepLearningImplementations / standard_conv_block

Function standard_conv_block

Eve/models.py:10–22  ·  view source on GitHub ↗
(x, nb_filter, strides=(1,1), pooling=False, bn=False, dropout_rate=None, weight_decay=0)

Source from the content-addressed store, hash-verified

8
9
10def standard_conv_block(x, nb_filter, strides=(1,1), pooling=False, bn=False, dropout_rate=None, weight_decay=0):
11 x = Conv2D(nb_filter, (3, 3),
12 strides=strides,
13 padding="same",
14 kernel_regularizer=l2(weight_decay))(x)
15 if bn:
16 x = BatchNormalization(mode=2, axis=1)(x)
17 x = Activation("relu")(x)
18 if pooling:
19 x = MaxPooling2D()(x)
20 if dropout_rate:
21 x = Dropout(dropout_rate)(x)
22 return x
23
24
25def FCN(img_dim, nb_classes, model_name="FCN"):

Callers 2

CNNFunction · 0.85
Big_CNNFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected