just wondering how to code if I would like to use the pretrained model based on argument. E.g I code a function as train(model), when user input the model name, the function will download the pretrained model accordingly. I know I can use ‘if’, but as there are many pre-trainded model, so is there any elegant way to do so?
I tried as below:
m = ‘vgg16’
model = models.m(pretrained = True)
but it will pop up the errors.