e0b692c96565074d4cb148e6011b2007d0a55348,examples/model_compress/model_speedup.py,,,#,129

Before Change


        if args.masks_file is None:
            args.masks_file = "mask.pth"
        fpgm_speedup(args.masks_file, args.model_checkpoint)
    elif args.example_name == "l1filter":
        if args.masks_file is None:
            args.masks_file = "mask_vgg16_cifar10.pth"
        l1filter_speedup(args.masks_file, args.model_checkpoint)
    elif args.example_name == "apoz":
        if args.masks_file is None:
            args.masks_file = "mask_vgg16_cifar10.pth"
        apoz_speedup(args.masks_file, args.model_checkpoint)
    else:
        raise ValueError("unsupported example_name: {}".format(args.example_name))

After Change


    if args.example_name != "all":
        if args.masks_file is not None:
            config[args.example_name]["masks_file"] = args.masks_file
        if not os.path.exists(config[args.example_name]["masks_file"]):
            msg = "{} does not exist! You should specify masks_file correctly, " \
                  "or use default one which is generated by model_prune_torch.py"
            raise RuntimeError(msg.format(config[args.example_name]["masks_file"]))
        model_inference(config[args.example_name])
    else:
        model_inference(config["fpgm"])
        model_inference(config["slim"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: microsoft/nni
Commit Name: e0b692c96565074d4cb148e6011b2007d0a55348
Time: 2020-03-23
Author: Quanlu.Zhang@microsoft.com
File Name: examples/model_compress/model_speedup.py
Class Name:
Method Name:


Project Name: deepmipt/DeepPavlov
Commit Name: 00de689e6624b4b3c312c921226ad23f49a79229
Time: 2018-01-19
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/keras_model.py
Class Name: KerasModel
Method Name: load


Project Name: AlexEMG/DeepLabCut
Commit Name: 857cb1f38abfc3f467b6a8e53ae54365e05fcff2
Time: 2019-02-23
Author: amathis@fas.harvard.edu
File Name: deeplabcut/create_project/add.py
Class Name:
Method Name: add_new_videos