Skip to content

Commit

Permalink
Reformatting using format.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Frightera committed Feb 9, 2023
1 parent 71eaa69 commit ebd6940
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 4 additions & 2 deletions keras/applications/applications_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def test_application_pooling(self, app, last_dim):

@parameterized.parameters(MODEL_LIST)
def test_application_classifier_activation(self, app):
model = app(weights=None, include_top=True, classifier_activation="softmax")
model = app(
weights=None, include_top=True, classifier_activation="softmax"
)
last_layer_act = model.layers[-1].activation.__name__
self.assertEqual(last_layer_act, "softmax")

Expand Down Expand Up @@ -225,7 +227,7 @@ def test_application_variable_input_channels(self, app, last_dim):

@parameterized.parameters(*MOBILENET_V3_FOR_WEIGHTS)
def test_mobilenet_v3_load_weights(
self, mobilenet_class, alpha, minimalistic, include_top
self, mobilenet_class, alpha, minimalistic, include_top
):
mobilenet_class(
input_shape=(224, 224, 3),
Expand Down
16 changes: 10 additions & 6 deletions keras/applications/convnext.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,11 @@ def apply(x):
x = layers.LayerNormalization(
epsilon=1e-6, name=name + "_head_layernorm"
)(x)
x = layers.Dense(num_classes,
activation=classifier_activation,
name=name + "_head_dense")(x)
x = layers.Dense(
num_classes,
activation=classifier_activation,
name=name + "_head_dense",
)(x)
return x

return apply
Expand Down Expand Up @@ -526,9 +528,11 @@ def ConvNeXt(

if include_top:
imagenet_utils.validate_activation(classifier_activation, weights)
x = Head(num_classes=classes,
classifier_activation=classifier_activation,
name=model_name)(x)
x = Head(
num_classes=classes,
classifier_activation=classifier_activation,
name=model_name,
)(x)

else:
if pooling == "avg":
Expand Down

0 comments on commit ebd6940

Please sign in to comment.