Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit 9cb8de4

Browse files
add missing he_normal initializer to final dense layer
1 parent ddd75d3 commit 9cb8de4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

zoo/resnext/resnext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def classifier(x, n_classes):
155155
"""
156156
# Final Dense Outputting Layer
157157
x = GlobalAveragePooling2D()(x)
158-
outputs = Dense(n_classes, activation='softmax')(x)
158+
outputs = Dense(n_classes, activation='softmax', kernel_initializer='he_normal')(x)
159159
return outputs
160160

161161
# Meta-parameter: number of filters in, out and number of blocks

zoo/resnext/resnext_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def classifier(self, x, n_classes):
207207
"""
208208
# Final Dense Outputting Layer
209209
x = GlobalAveragePooling2D()(x)
210-
outputs = Dense(n_classes, activation='softmax')(x)
210+
outputs = Dense(n_classes, activation='softmax', kernel_initializer=self.init_weights)(x)
211211
return outputs
212212

213213

zoo/resnext/resnext_cifar10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def classifier(x, nclasses):
9999
"""
100100
# Final Dense Outputting Layer for the outputs
101101
x = GlobalAveragePooling2D()(x)
102-
outputs = Dense(nclasses, activation='softmax')(x)
102+
outputs = Dense(nclasses, activation='softmax', kernel_initializer='he_normal')(x)
103103
return outputs
104104

105105
# Meta-parameter: width of group convolutional

0 commit comments

Comments
 (0)