Skip to content

Commit b4e216e

Browse files
committed
Fix a few small things.
1 parent dc85e5a commit b4e216e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

timm/models/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def load_pretrained(model, cfg=None, num_classes=1000, in_chans=3, filter_fn=Non
185185
state_dict = filter_fn(state_dict)
186186

187187
input_convs = cfg.get('first_conv', None)
188-
if input_convs is not None:
188+
if input_convs is not None and in_chans != 3:
189189
if isinstance(input_convs, str):
190190
input_convs = (input_convs,)
191191
for input_conv_name in input_convs:

timm/models/inception_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ def _cfg(url='', **kwargs):
3232
# my port of Tensorflow SLIM weights (http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz)
3333
'tf_inception_v3': _cfg(
3434
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_inception_v3-e0069de4.pth',
35-
num_classes=1001, has_aux=False),
35+
num_classes=1000, has_aux=False, label_offset=1),
3636
# my port of Tensorflow adversarially trained Inception V3 from
3737
# http://download.tensorflow.org/models/adv_inception_v3_2017_08_18.tar.gz
3838
'adv_inception_v3': _cfg(
3939
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/adv_inception_v3-9e27bd63.pth',
40-
num_classes=1001, has_aux=False),
40+
num_classes=1000, has_aux=False, label_offset=1),
4141
# from gluon pretrained models, best performing in terms of accuracy/loss metrics
4242
# https://gluon-cv.mxnet.io/model_zoo/classification.html
4343
'gluon_inception_v3': _cfg(

validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def main():
284284
if args.model == 'all':
285285
# validate all models in a list of names with pretrained checkpoints
286286
args.pretrained = True
287-
model_names = list_models(pretrained=True)
287+
model_names = list_models(pretrained=True, exclude_filters=['*in21k'])
288288
model_cfgs = [(n, '') for n in model_names]
289289
elif not is_model(args.model):
290290
# model name doesn't exist, try as wildcard filter

0 commit comments

Comments
 (0)