Skip to content

Instantly share code, notes, and snippets.

@budui
Created April 21, 2019 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save budui/07d7796d7d8c8c3e30b759892ef32864 to your computer and use it in GitHub Desktop.
Save budui/07d7796d7d8c8c3e30b759892ef32864 to your computer and use it in GitHub Desktop.
Use `string` param to switch model to load.
import models
model = getattr(models, 'AlexNet')()
# same as:
# model = models.AlexNet()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment