Skip to content

Adds efficientnet2 presets #1983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix unit test regression
  • Loading branch information
pkgoogle committed Nov 7, 2024
commit 5533922b55847b6557118e51c4fdf361b38791f1
2 changes: 1 addition & 1 deletion keras_hub/src/models/efficientnet/efficientnet_backbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def __init__(
self.stackwise_strides = stackwise_strides
self.stackwise_block_types = stackwise_block_types

self.stackwise_force_input_filters = (stackwise_force_input_filters,)
self.stackwise_force_input_filters = stackwise_force_input_filters
self.include_stem_padding = include_stem_padding
self.use_depth_divisor_as_min_depth = use_depth_divisor_as_min_depth
self.cap_round_filter_decrease = cap_round_filter_decrease
Expand Down
14 changes: 5 additions & 9 deletions keras_hub/src/models/efficientnet/efficientnet_backbone_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def setUp(self):
],
"stackwise_strides": [1, 2, 2, 2, 1, 2],
"stackwise_block_types": ["fused"] * 3 + ["unfused"] * 3,
"stackwise_force_input_filters": [0] * 6,
"stackwise_nores_option": [False] * 6,
"width_coefficient": 1.0,
"depth_coefficient": 1.0,
}
Expand Down Expand Up @@ -60,15 +62,9 @@ def test_valid_call_original_v1(self):
"stackwise_output_filters": [16, 24, 40, 80, 112, 192, 320],
"stackwise_expansion_ratios": [1, 6, 6, 6, 6, 6, 6],
"stackwise_strides": [1, 2, 2, 2, 1, 2, 1],
"stackwise_squeeze_and_excite_ratios": [
0.25,
0.25,
0.25,
0.25,
0.25,
0.25,
0.25,
],
"stackwise_squeeze_and_excite_ratios": [0.25] * 7,
"stackwise_force_input_filters": [0] * 7,
"stackwise_nores_option": [False] * 7,
"width_coefficient": 1.0,
"depth_coefficient": 1.0,
"stackwise_block_types": ["v1"] * 7,
Expand Down
Loading