Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ushareng committed Oct 24, 2024
1 parent 0ea6a4c commit e4c43dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keras_hub/src/utils/timm/convert_mobilenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def convert_backbone_config(timm_config):
[None, None],
[0.25, 0.25, 0.25],
[0.25, 0.25],
[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25],
]
stackwise_activation = [
["relu", "relu"],
Expand Down Expand Up @@ -100,7 +100,7 @@ def port_batch_normalization(keras_layer_name, hf_weight_prefix):
backbone.get_layer(keras_layer_name).moving_variance,
hf_weight_key=f"{hf_weight_prefix}.running_var",
)

# Stem
port_conv2d("input_conv", "conv_stem")
port_batch_normalization("input_batch_norm", "bn1")
Expand Down Expand Up @@ -154,6 +154,7 @@ def port_batch_normalization(keras_layer_name, hf_weight_prefix):
# if version == "v2":
# port_batch_normalization("output_batch_norm", "bn2")


def convert_head(task, loader, timm_config):
prefix = "classifier."
loader.port_weight(
Expand Down

0 comments on commit e4c43dc

Please sign in to comment.