Skip to content

Commit 857f330

Browse files
committed
Add native PyTorch weights for MixNet-Medium with no SAME padding necessary. Remove unused block of code.
1 parent e7c8a37 commit 857f330

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ I've leveraged the training scripts in this repository to train a few of the mod
7575
| resnext50d_32x4d | 79.674 (20.326) | 94.868 (5.132) | 25.1M | bicubic |
7676
| resnext50_32x4d | 78.512 (21.488) | 94.042 (5.958) | 25M | bicubic |
7777
| resnet50 | 78.470 (21.530) | 94.266 (5.734) | 25.6M | bicubic |
78+
| mixnet_m | 77.256 (22.744) | 93.418 (6.582) | 5.01M | bicubic |
7879
| seresnext26_32x4d | 77.104 (22.896) | 93.316 (6.684) | 16.8M | bicubic |
7980
| efficientnet_b0 | 76.912 (23.088) | 93.210 (6.790) | 5.29M | bicubic |
8081
| resnet26d | 76.68 (23.32) | 93.166 (6.834) | 16M | bicubic |

timm/models/gen_efficientnet.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def _cfg(url='', **kwargs):
103103
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b5-c6949ce9.pth',
104104
input_size=(3, 456, 456), pool_size=(15, 15), crop_pct=0.934),
105105
'mixnet_s': _cfg(url=''),
106-
'mixnet_m': _cfg(url=''),
106+
'mixnet_m': _cfg(
107+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mixnet_m-4647fc68.pth'),
107108
'mixnet_l': _cfg(url=''),
108109
'tf_mixnet_s': _cfg(
109110
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_mixnet_s-89d3354b.pth'),
@@ -271,13 +272,6 @@ def _decode_block_str(block_str, depth_multiplier=1.0):
271272
return [deepcopy(block_args) for _ in range(num_repeat)]
272273

273274

274-
def _decode_arch_args(string_list):
275-
block_args = []
276-
for block_str in string_list:
277-
block_args.append(_decode_block_str(block_str))
278-
return block_args
279-
280-
281275
def _decode_arch_def(arch_def, depth_multiplier=1.0):
282276
arch_args = []
283277
for stack_idx, block_strings in enumerate(arch_def):
@@ -1612,8 +1606,8 @@ def mixnet_m(pretrained=False, num_classes=1000, in_chans=3, **kwargs):
16121606
model = _gen_mixnet_m(
16131607
channel_multiplier=1.0, num_classes=num_classes, in_chans=in_chans, **kwargs)
16141608
model.default_cfg = default_cfg
1615-
#if pretrained:
1616-
# load_pretrained(model, default_cfg, num_classes, in_chans)
1609+
if pretrained:
1610+
load_pretrained(model, default_cfg, num_classes, in_chans)
16171611
return model
16181612

16191613

0 commit comments

Comments
 (0)