Skip to content

Commit 9816ca3

Browse files
committed
Add EdgeTPU models to sotabench, remove some unicode chars from model names
1 parent 9ec6824 commit 9816ca3

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

sotabench.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from torchbench.image_classification import ImageNet
22
from timm import create_model, list_models
33
from timm.data import resolve_data_config, create_transform
4+
import os
45

56
NUM_GPU = 1
67
BATCH_SIZE = 256 * NUM_GPU
@@ -86,13 +87,13 @@ def _attrib(paper_model_name='', paper_arxiv_id='', batch_size=BATCH_SIZE):
8687
gluon_xception65=_attrib(
8788
paper_model_name='Modified Aligned Xception', paper_arxiv_id='1802.02611', batch_size=BATCH_SIZE//2),
8889
ig_resnext101_32x8d=_attrib(
89-
paper_model_name='ResNeXt-101 32×8d', paper_arxiv_id='1805.00932'),
90+
paper_model_name='ResNeXt-101 32x8d', paper_arxiv_id='1805.00932'),
9091
ig_resnext101_32x16d=_attrib(
91-
paper_model_name='ResNeXt-101 32×16d', paper_arxiv_id='1805.00932'),
92+
paper_model_name='ResNeXt-101 32x16d', paper_arxiv_id='1805.00932'),
9293
ig_resnext101_32x32d=_attrib(
93-
paper_model_name='ResNeXt-101 32×32d', paper_arxiv_id='1805.00932', batch_size=BATCH_SIZE//2),
94+
paper_model_name='ResNeXt-101 32x32d', paper_arxiv_id='1805.00932', batch_size=BATCH_SIZE//2),
9495
ig_resnext101_32x48d=_attrib(
95-
paper_model_name='ResNeXt-101 32×48d', paper_arxiv_id='1805.00932', batch_size=BATCH_SIZE//4),
96+
paper_model_name='ResNeXt-101 32x48d', paper_arxiv_id='1805.00932', batch_size=BATCH_SIZE//4),
9697
inception_resnet_v2=_attrib(
9798
paper_model_name='Inception ResNet V2', paper_arxiv_id='1602.07261'),
9899
#inception_v3=dict(paper_model_name='Inception V3', paper_arxiv_id=), # same weights as torchvision
@@ -167,6 +168,12 @@ def _attrib(paper_model_name='', paper_arxiv_id='', batch_size=BATCH_SIZE):
167168
paper_model_name='EfficientNet-B6', paper_arxiv_id='1905.11946', batch_size=BATCH_SIZE//8),
168169
tf_efficientnet_b7=_attrib(
169170
paper_model_name='EfficientNet-B7', paper_arxiv_id='1905.11946', batch_size=BATCH_SIZE//8),
171+
tf_efficientnet_es=_attrib(
172+
paper_model_name='EfficientNet-EdgeTPU-S', paper_arxiv_id='1905.11946'),
173+
tf_efficientnet_em=_attrib(
174+
paper_model_name='EfficientNet-EdgeTPU-M', paper_arxiv_id='1905.11946'),
175+
tf_efficientnet_el=_attrib(
176+
paper_model_name='EfficientNet-EdgeTPU-L', paper_arxiv_id='1905.11946', batch_size=BATCH_SIZE//2),
170177
tf_inception_v3=_attrib(
171178
paper_model_name='Inception V3', paper_arxiv_id='1512.00567'),
172179
tf_mixnet_l=_attrib(
@@ -208,7 +215,7 @@ def _attrib(paper_model_name='', paper_arxiv_id='', batch_size=BATCH_SIZE):
208215
input_transform=input_transform,
209216
batch_size=model_map[model_name]['batch_size'],
210217
num_gpu=NUM_GPU,
211-
#data_root=DATA_ROOT
218+
data_root=os.environ.get('IMAGENET_DIR', './imagenet')
212219
)
213220

214221

0 commit comments

Comments
 (0)