Skip to content

Commit f45de37

Browse files
committed
Merge branch 'master' into levit_visformer_rednet
2 parents 9a3ae97 + 23c18a3 commit f45de37

File tree

13 files changed

+1157
-80
lines changed

13 files changed

+1157
-80
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ I'm fortunate to be able to dedicate significant time and money of my own suppor
2626
### May 14, 2021
2727
* Add EfficientNet-V2 official model defs w/ ported weights from official [Tensorflow/Keras](https://github.com/google/automl/tree/master/efficientnetv2) impl.
2828
* 1k trained variants: `tf_efficientnetv2_s/m/l`
29-
* 21k trained variants: `tf_efficientnetv2_s/m/l_21k`
30-
* 21k pretrained -> 1k fine-tuned: `tf_efficientnetv2_s/m/l_21ft1k`
31-
* v2 models w/ v1 scaling: `tf_efficientnet_v2_b0` through `b3`
29+
* 21k trained variants: `tf_efficientnetv2_s/m/l_in21k`
30+
* 21k pretrained -> 1k fine-tuned: `tf_efficientnetv2_s/m/l_in21ft1k`
31+
* v2 models w/ v1 scaling: `tf_efficientnetv2_b0` through `b3`
3232
* Rename my prev V2 guess `efficientnet_v2s` -> `efficientnetv2_rw_s`
3333
* Some blank `efficientnetv2_*` models in-place for future native PyTorch training
3434

inference.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ def main():
114114
_logger.info('Predict: [{0}/{1}] Time {batch_time.val:.3f} ({batch_time.avg:.3f})'.format(
115115
batch_idx, len(loader), batch_time=batch_time))
116116

117-
topk_ids = np.concatenate(topk_ids, axis=0).squeeze()
117+
topk_ids = np.concatenate(topk_ids, axis=0)
118118

119119
with open(os.path.join(args.output_dir, './topk_ids.csv'), 'w') as out_file:
120120
filenames = loader.dataset.filenames(basename=True)
121121
for filename, label in zip(filenames, topk_ids):
122-
out_file.write('{0},{1},{2},{3},{4},{5}\n'.format(
123-
filename, label[0], label[1], label[2], label[3], label[4]))
122+
out_file.write('{0},{1}\n'.format(
123+
filename, ','.join([ str(v) for v in label])))
124124

125125

126126
if __name__ == '__main__':

tests/test_models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
torch._C._jit_set_profiling_mode(False)
1616

1717
# transformer models don't support many of the spatial / feature based model functionalities
18-
NON_STD_FILTERS = ['vit_*', 'tnt_*', 'pit_*', 'swin_*', 'coat_*', 'cait_*', 'mixer_*', 'levit*', 'visformer*']
18+
NON_STD_FILTERS = [
19+
'vit_*', 'tnt_*', 'pit_*', 'swin_*', 'coat_*', 'cait_*', '*mixer_*', 'gmlp_*', 'resmlp_*', 'twins_*',
20+
'convit_*', 'levit*', 'visformer*']
1921
NUM_NON_STD = len(NON_STD_FILTERS)
2022

2123
# exclude models that cause specific test failures

timm/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from .byobnet import *
33
from .cait import *
44
from .coat import *
5+
from .convit import *
56
from .cspnet import *
67
from .densenet import *
78
from .dla import *
@@ -42,6 +43,7 @@
4243
from .vovnet import *
4344
from .xception import *
4445
from .xception_aligned import *
46+
from .twins import *
4547

4648
from .factory import create_model, split_model_name, safe_model_name
4749
from .helpers import load_checkpoint, resume_checkpoint, model_parameters

0 commit comments

Comments
 (0)