Skip to content

Commit d3ba34e

Browse files
committed
Fix Mobilenet V3 model name for sotabench. Minor res2net cleanup.
1 parent b5a8bb5 commit d3ba34e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sotabench.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import torch
12
from torchbench.image_classification import ImageNet
23
from timm import create_model
34
from timm.data import resolve_data_config, create_transform
@@ -77,7 +78,7 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
7778
_entry('mixnet_m', 'MixNet-M', '1907.09595'),
7879
_entry('mixnet_s', 'MixNet-S', '1907.09595'),
7980
_entry('mnasnet_100', 'MnasNet-B1', '1807.11626'),
80-
_entry('mobilenetv3_100', 'MobileNet V3(1.0)', '1905.02244',
81+
_entry('mobilenetv3_100', 'MobileNet V3-Large 1.0', '1905.02244',
8182
model_desc='Trained in PyTorch with RMSProp, exponential LR decay, and hyper-params matching '
8283
'paper as closely as possible.'),
8384
_entry('resnet18', 'ResNet-18', '1812.01187'),
@@ -216,4 +217,6 @@ def _entry(model_name, paper_model_name, paper_arxiv_id, batch_size=BATCH_SIZE,
216217
data_root=os.environ.get('IMAGENET_DIR', './imagenet')
217218
)
218219

220+
torch.cuda.empty_cache()
221+
219222

timm/models/res2net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, inplanes, planes, stride=1, downsample=None,
5858
super(Bottle2neck, self).__init__()
5959
assert dilation == 1 and previous_dilation == 1 # FIXME support dilation
6060
self.scale = scale
61-
self.is_first = True if stride > 1 or downsample is not None else False
61+
self.is_first = stride > 1 or downsample is not None
6262
self.num_scales = max(1, scale - 1)
6363
width = int(math.floor(planes * (base_width / 64.0))) * cardinality
6464
outplanes = planes * self.expansion

0 commit comments

Comments
 (0)