Skip to content

Commit 5c6da1c

Browse files
committed
Experiment with sotabench model_description field.
1 parent e9d2ec4 commit 5c6da1c

File tree

1 file changed

+37
-15
lines changed

1 file changed

+37
-15
lines changed

sotabench.py

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
BATCH_SIZE = 256 * NUM_GPU
99

1010

11-
def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE, ttp=False, args=dict()):
11+
def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
12+
ttp=False, args=dict(), model_desc=None):
1213
return dict(
1314
model=model_name,
15+
model_description=model_desc,
1416
paper_model_name=paper_model_name,
1517
paper_arxiv_id=paper_arxiv_id,
1618
batch_size=batch_size,
@@ -46,7 +48,7 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
4648
#_entry('ens_adv_inception_resnet_v2', 'Ensemble Adversarial Inception V3'),
4749
_entry('fbnetc_100', 'FBNet-C', '1812.03443'),
4850
_entry('gluon_inception_v3', 'Inception V3', '1512.00567'),
49-
_entry('gluon_resnet18_v1b', 'ResNet-18', '1812.01187'),
51+
_entry('gluon_resnet18_v1b', 'ResNet-18', '1812.01187', model_desc='Ported from GluonCV Model Zoo'),
5052
_entry('gluon_resnet34_v1b', 'ResNet-34', '1812.01187'),
5153
_entry('gluon_resnet50_v1b', 'ResNet-50', '1812.01187'),
5254
_entry('gluon_resnet50_v1c', 'ResNet-50-C', '1812.01187'),
@@ -79,7 +81,9 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
7981
_entry('mixnet_m', 'MixNet-M', '1907.09595'),
8082
_entry('mixnet_s', 'MixNet-S', '1907.09595'),
8183
_entry('mnasnet_100', 'MnasNet-B1', '1807.11626'),
82-
_entry('mobilenetv3_100', 'MobileNet V3(1.0)', '1905.02244'),
84+
_entry('mobilenetv3_100', 'MobileNet V3(1.0)', '1905.02244',
85+
model_desc='Trained from scratch in PyTorch with RMSProp, exponential LR decay, and hyper-params matching'
86+
' paper as closely as possible.'),
8387
_entry('nasnetalarge', 'NASNet-A Large', '1707.07012', batch_size=BATCH_SIZE//4),
8488
_entry('pnasnet5large', 'PNASNet-5', '1712.00559', batch_size=BATCH_SIZE//4),
8589
_entry('resnet18', 'ResNet-18', '1812.01187'),
@@ -90,7 +94,13 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
9094
#_entry('resnet101', , ), # same weights as torchvision
9195
#_entry('resnet152', , ), # same weights as torchvision
9296
_entry('resnext50_32x4d', 'ResNeXt-50 32x4d', '1812.01187'),
93-
_entry('resnext50d_32x4d', 'ResNeXt-50-D 32x4d', '1812.01187'),
97+
_entry('resnext50d_32x4d', 'ResNeXt-50-D 32x4d', '1812.01187',
98+
model_desc="""'D' variant (3x3 deep stem w/ avg-pool downscale)
99+
Trained with:
100+
* SGD w/ cosine LR decay
101+
* Random-erasing (gaussian per-pixel noise)
102+
* Label-smoothing
103+
"""),
94104
#_entry('resnext101_32x8d', ), # same weights as torchvision
95105
_entry('semnasnet_100', 'MnasNet-A1', '1807.11626'),
96106
_entry('senet154', 'SENet-154', '1709.01507'),
@@ -103,17 +113,28 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
103113
_entry('seresnext50_32x4d', 'SE-ResNeXt-50 32x4d', '1709.01507'),
104114
_entry('seresnext101_32x4d', 'SE-ResNeXt-101 32x4d', '1709.01507'),
105115
_entry('spnasnet_100', 'Single-Path NAS', '1904.02877'),
106-
_entry('tf_efficientnet_b0', 'EfficientNet-B0 (AutoAugment)', '1905.11946'),
107-
_entry('tf_efficientnet_b1', 'EfficientNet-B1 (AutoAugment)', '1905.11946'),
108-
_entry('tf_efficientnet_b2', 'EfficientNet-B2 (AutoAugment)', '1905.11946'),
109-
_entry('tf_efficientnet_b3', 'EfficientNet-B3 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//2),
110-
_entry('tf_efficientnet_b4', 'EfficientNet-B4 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//2),
111-
_entry('tf_efficientnet_b5', 'EfficientNet-B5 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//4),
112-
_entry('tf_efficientnet_b6', 'EfficientNet-B6 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//8),
113-
_entry('tf_efficientnet_b7', 'EfficientNet-B7 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//8),
114-
_entry('tf_efficientnet_es', 'EfficientNet-EdgeTPU-S', '1905.11946'),
115-
_entry('tf_efficientnet_em', 'EfficientNet-EdgeTPU-M', '1905.11946'),
116-
_entry('tf_efficientnet_el', 'EfficientNet-EdgeTPU-L', '1905.11946', batch_size=BATCH_SIZE//2),
116+
_entry('tf_efficientnet_b0', 'EfficientNet-B0 (AutoAugment)', '1905.11946',
117+
model_desc='Ported from official Google AI Tensorflow weights'),
118+
_entry('tf_efficientnet_b1', 'EfficientNet-B1 (AutoAugment)', '1905.11946',
119+
model_desc='Ported from official Google AI Tensorflow weights'),
120+
_entry('tf_efficientnet_b2', 'EfficientNet-B2 (AutoAugment)', '1905.11946',
121+
model_desc='Ported from official Google AI Tensorflow weights'),
122+
_entry('tf_efficientnet_b3', 'EfficientNet-B3 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//2,
123+
model_desc='Ported from official Google AI Tensorflow weights'),
124+
_entry('tf_efficientnet_b4', 'EfficientNet-B4 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//2,
125+
model_desc='Ported from official Google AI Tensorflow weights'),
126+
_entry('tf_efficientnet_b5', 'EfficientNet-B5 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//4,
127+
model_desc='Ported from official Google AI Tensorflow weights'),
128+
_entry('tf_efficientnet_b6', 'EfficientNet-B6 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//8,
129+
model_desc='Ported from official Google AI Tensorflow weights'),
130+
_entry('tf_efficientnet_b7', 'EfficientNet-B7 (AutoAugment)', '1905.11946', batch_size=BATCH_SIZE//8,
131+
model_desc='Ported from official Google AI Tensorflow weights'),
132+
_entry('tf_efficientnet_es', 'EfficientNet-EdgeTPU-S', '1905.11946',
133+
model_desc='Ported from official Google AI Tensorflow weights'),
134+
_entry('tf_efficientnet_em', 'EfficientNet-EdgeTPU-M', '1905.11946',
135+
model_desc='Ported from official Google AI Tensorflow weights'),
136+
_entry('tf_efficientnet_el', 'EfficientNet-EdgeTPU-L', '1905.11946', batch_size=BATCH_SIZE//2,
137+
model_desc='Ported from official Google AI Tensorflow weights'),
117138
_entry('tf_inception_v3', 'Inception V3', '1512.00567'),
118139
_entry('tf_mixnet_l', 'MixNet-L', '1907.09595'),
119140
_entry('tf_mixnet_m', 'MixNet-M', '1907.09595'),
@@ -144,6 +165,7 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
144165
# Run the benchmark
145166
ImageNet.benchmark(
146167
model=model,
168+
model_description=m.get('model_description', None),
147169
paper_model_name=m['paper_model_name'],
148170
paper_arxiv_id=m['paper_arxiv_id'],
149171
input_transform=input_transform,

0 commit comments

Comments
 (0)