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

Before Change


            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: 9

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: tensorlayer/tensorlayer
Commit Name: 35b2c4917344f338eda67c78673cf4064b3b4265
Time: 2020-02-07
Author: 34995488+Tokarev-TT-33@users.noreply.github.com
File Name: examples/reinforcement_learning/tutorial_DQN.py
Class Name:
Method Name:


Project Name: NervanaSystems/nlp-architect
Commit Name: 650a9bb35b4b0796ee90c5ac0b498af54c32c2e3
Time: 2018-05-08
Author: peteriz@users.noreply.github.com
File Name: core_models/intent_extraction/interactive.py
Class Name:
Method Name: