7cda122d9636cdfe8dab5c745b3fa4d30ab57cc9,gluon/utils.py,,prepare_model,#Any#Any#Any#Any#Any#Any#,171

Before Change


        net.initialize(mx.init.MSRAPrelu(), ctx=ctx)

    if tune_layers:
        tune_layers_ptrn = tuple(tune_layers.split(","))
        params = net._collect_params_with_prefix()
        param_keys = list(params.keys())
        for key in param_keys:
            if not key.startswith(tune_layers_ptrn):

After Change



    if tune_layers:
        tune_layers_pattern = re.compile(tune_layers)
        for k, v in net._collect_params_with_prefix().items():
            if tune_layers_pattern.match(k):
                logging.info("Fine-tune parameter: {}".format(k))
            else:
                v.grad_req = "null"
        for param in net.collect_params().values():
            if param._data is not None:
                continue
            param.initialize(mx.init.MSRAPrelu(), ctx=ctx)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: osmr/imgclsmob
Commit Name: 7cda122d9636cdfe8dab5c745b3fa4d30ab57cc9
Time: 2018-12-11
Author: osemery@gmail.com
File Name: gluon/utils.py
Class Name:
Method Name: prepare_model


Project Name: codelucas/newspaper
Commit Name: 5d6cdbd53544d057a1cf344526ec70e0995b77d1
Time: 2014-12-17
Author: lucasyangpersonal@gmail.com
File Name: newspaper/nlp.py
Class Name:
Method Name: keywords


Project Name: dask/dask-image
Commit Name: f9aea094643fb3240193b0bc0f1908d5b84d82ab
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: center_of_mass