Skip to content

Commit 86bc3e5

Browse files
desimonesoumith
authored andcommitted
Add model_names back. Fixes pytorch#195
1 parent fb9ca4d commit 86bc3e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

imagenet/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
import torchvision.datasets as datasets
1616
import torchvision.models as models
1717

18+
model_names = sorted(name for name in models.__dict__
19+
if name.islower() and not name.startswith("__")
20+
and callable(models.__dict__[name]))
1821

1922
parser = argparse.ArgumentParser(description='PyTorch ImageNet Training')
2023
parser.add_argument('data', metavar='DIR',

0 commit comments

Comments
 (0)