import sys

def network(args):
    if args.net == 'alexnet':
        from models.AlexNet import alexnet
        net = alexnet(num_class=args.num_class)
    elif args.net == 'fractalnet34':
        from models.FratalNet import fractalnet34
        net = fractalnet34(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'googlenet':
        from models.GoogLeNet import googlenet
        net = googlenet(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'inception_v3':
        from models.InceptionV3 import inception_v3
        net = inception_v3(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'mobilenet_v1':
        from models.MobileNetV1 import mobilenet_v1
        net = mobilenet_v1(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'preactresnet18':
        from models.PreActResNet import peractresnet18
        net = peractresnet18(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'preactresnet34':
        from models.PreActResNet import peractresnet34
        net = peractresnet34(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'preactresnet50':
        from models.PreActResNet import peractresnet50
        net = peractresnet50(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'preactresnet101':
        from models.PreActResNet import peractresnet101
        net = peractresnet101(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'preactresnet152':
        from models.PreActResNet import peractresnet152
        net = peractresnet152(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet18':
        from models.ResNet import resnet18
        net = resnet18(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet34':
        from models.ResNet import resnet34
        net = resnet34(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet50':
        from models.ResNet import resnet50
        net = resnet50(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet101':
        from models.ResNet import resnet101
        net = resnet101(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet152':
        from models.ResNet import resnet152
        net = resnet152(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'se_resnet50':
        from models.SEResNet import se_resnet50
        net = se_resnet50(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'se_resnet101':
        from models.SEResNet import se_resnet101
        net = se_resnet101(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'se_resnet152':
        from models.SEResNet import se_resnet152
        net = se_resnet152(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_05x_g1':
        from models.ShuffleNet import shufflenet_05x_g1
        net = shufflenet_05x_g1(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_05x_g2':
        from models.ShuffleNet import shufflenet_05x_g2
        net = shufflenet_05x_g2(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_05x_g3':
        from models.ShuffleNet import shufflenet_05x_g3
        net = shufflenet_05x_g3(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_05x_g4':
        from models.ShuffleNet import shufflenet_05x_g4
        net = shufflenet_05x_g4(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_025x_g1':
        from models.ShuffleNet import shufflenet_025x_g1
        net = shufflenet_025x_g1(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_025x_g2':
        from models.ShuffleNet import shufflenet_025x_g2
        net = shufflenet_025x_g2(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_025x_g3':
        from models.ShuffleNet import shufflenet_025x_g3
        net = shufflenet_025x_g3(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_025x_g4':
        from models.ShuffleNet import shufflenet_025x_g4
        net = shufflenet_025x_g4(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_1x_g1':
        from models.ShuffleNet import shufflenet_1x_g1
        net = shufflenet_1x_g1(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_1x_g2':
        from models.ShuffleNet import shufflenet_1x_g2
        net = shufflenet_1x_g2(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_1x_g3':
        from models.ShuffleNet import shufflenet_1x_g3
        net = shufflenet_1x_g3(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'shufflenet_1x_g4':
        from models.ShuffleNet import shufflenet_1x_g4
        net = shufflenet_1x_g4(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'squeezenet':
        from models.SqueezeNet import squeezenet
        net = squeezenet(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'stochastic_depth18':
        from models.StochasticDepth import stochastic_depth18
        net = stochastic_depth18(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'stochastic_depth34':
        from models.StochasticDepth import stochastic_depth34
        net = stochastic_depth34(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'stochastic_depth50':
        from models.StochasticDepth import stochastic_depth50
        net = stochastic_depth50(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'stochastic_depth101':
        from models.StochasticDepth import stochastic_depth101
        net = stochastic_depth101(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'stochastic_depth152':
        from models.StochasticDepth import stochastic_depth152
        net = stochastic_depth152(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_11':
        from models.VGG import vgg_11
        net = vgg_11(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_11_lrn':
        from models.VGG import vgg_11_lrn
        net = vgg_11_lrn(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_13':
        from models.VGG import vgg_13
        net = vgg_13(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_16_c':
        from models.VGG import vgg_16_c
        net = vgg_16_c(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_16_d':
        from models.VGG import vgg_16_d
        net = vgg_16_d(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'vgg_19':
        from models.VGG import vgg_19
        net = vgg_19(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'wide_resnet40_4':
        from models.Wide_ResNet import wide_resnet40_4
        net = wide_resnet40_4(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'wide_resnet16_8':
        from models.Wide_ResNet import wide_resnet16_8
        net = wide_resnet16_8(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'wide_resnet28_10':
        from models.Wide_ResNet import wide_resnet28_10
        net = wide_resnet28_10(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'resnet110':
        from models.Wide_ResNet import resnet110
        net = resnet110(num_class=args.num_class, initialize=args.initialize)
    elif args.net == 'xception':
        from models.Xception import xception
        net = xception(num_class=args.num_class, initialize=args.initialize)
    return net