a37dcd46cba88dfd0478b601fb8fbf9b425780c0,example/automatic-mixed-precision/amp_model_conversion.py,,,#,50

Before Change


                                            If you want to use symbolic model instead, remove --use-gluon-model when running the script".format(gluon_models)
        net = gluoncv.model_zoo.get_model(args.model, pretrained=True)
        net.hybridize()
        result_before1 = net.forward(mx.nd.zeros((1, 3, 224, 224)))
        net.export("{}".format(args.model))
        net = amp.convert_hybrid_block(net, cast_optional_params=args.cast_optional_params)
        net.export("{}-amp".format(args.model), remove_amp_cast=False)
        if args.run_dummy_inference:

After Change


        shape = None
        if args.model in segmentation_models:
            shape = (1, 3, 480, 480)
        elif args.model in calib_ssd_models:
            shape = (1, 3, 512, 544)
        elif args.model in calib_inception_models:
            shape = (1, 3, 299, 299)
        else:
            shape = (1, 3, 224, 224)
        net = gluoncv.model_zoo.get_model(args.model, pretrained=True)
        net.hybridize()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: apache/incubator-mxnet
Commit Name: a37dcd46cba88dfd0478b601fb8fbf9b425780c0
Time: 2019-11-07
Author: anirudh2290@ufl.edu
File Name: example/automatic-mixed-precision/amp_model_conversion.py
Class Name:
Method Name:


Project Name: richzhang/PerceptualSimilarity
Commit Name: 7b34113cc3b5529a127bd02667de9de0b5b75df9
Time: 2019-07-26
Author: rich.zhang@eecs.berkeley.edu
File Name: models/networks_basic.py
Class Name: PNet
Method Name: forward


Project Name: masa-su/pixyz
Commit Name: 896014a6c0c62d4de8ccd1db7104a668a938694a
Time: 2019-05-26
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/flow_distribution.py
Class Name: TransformedDistribution
Method Name: sample


Project Name: BindsNET/bindsnet
Commit Name: 4ea63adbd3f5e01589e4424d14e6af7470dc03c8
Time: 2019-11-03
Author: djsaunde@umass.edu
File Name: bindsnet/network/network.py
Class Name: Network
Method Name: run