def select_model(m): if m == 'large': # raise ValueError model = pblm.cifar_model_large().cuda() else: model = pblm.cifar_model().cuda() return model
def select_model(m): if m == 'large': # raise ValueError model = pblm.cifar_model_large().cuda() elif m == 'resnet': model = pblm.cifar_model_resnet(N=args.resnet_N, factor=args.resnet_factor).cuda() else: model = pblm.cifar_model().cuda() return model
def select_model(m): if m == 'small': model = pblm.cifar_model().cuda() elif m == 'large': model = pblm.cifar_model_large().cuda() # elif m == 'resNet': # model = pblm.cifar_model_resnet().cuda() else: raise ValueError('model argument not recognized for imagenet') return model
def select_model(m): if m == 'large': # raise ValueError model = pblm.cifar_model_large().to(device) elif m == 'resnet': model = pblm.cifar_model_resnet(N=args.resnet_N, factor=args.resnet_factor).to(device) else: model = pblm.cifar_model().to(device) summary(model, (3, 32, 32)) return model
def select_model(m): if m == 'large': # raise ValueError model = pblm.cifar_model_large().cuda() elif m == 'resnet': model = pblm.cifar_model_resnet(N=args.resnet_N, factor=args.resnet_factor).cuda() elif m == 'm1': print('using a reduced sized network') model = pblm.cifar_model_m1().cuda() elif m == 'm2': print('using a slightly reduced sized network') model = pblm.cifar_model_m2().cuda() else: model = pblm.cifar_model().cuda() return model