Skip to content

Commit

Permalink
correctly print model_names
Browse files Browse the repository at this point in the history
  • Loading branch information
dongan-beta committed Dec 19, 2019
1 parent 5bcb9fc commit 3e0885f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dirtorch/nets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def create_model(arch, pretrained='', delete_fc=False, *args, **kwargs):
optional arguments
'''
# creating model
if arch not in globals():
if arch not in model_names:
raise NameError("unknown model architecture '%s'\nSelect one in %s" % (
arch, ','.join(model_names)))
model = globals()[arch](*args, **kwargs)
Expand Down

0 comments on commit 3e0885f

Please sign in to comment.