7b467f99e870bec93e3659b55b0ea068867f1593,apex_utils/apex/reparameterization/__init__.py,,apply_reparameterization,#,64

Before Change


    if name != "":
        Reparameterization.apply(module, name, dim, reparameterization, hook_child)
    else:
        names = list(module.state_dict().keys())
        for name in names:
            apply_reparameterization(module, reparameterization, name, dim, hook_child)
    return module

After Change


    if name2use != "":
        Reparameterization.apply(module, name, dim, reparameterization, hook_child)
    else:
        names = [n for n,_ in module2use.named_parameters()]
        if name2use != "":
            names = [name2use+"."+n for n in names]
        if name != "":
            names = [name+"."+n for n in names]
        for name in names:
            apply_reparameterization(module, reparameterization, name, dim, hook_child)
    return module
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NVIDIA/sentiment-discovery
Commit Name: 7b467f99e870bec93e3659b55b0ea068867f1593
Time: 2018-08-09
Author: raulp@dbcluster.nvidia.com
File Name: apex_utils/apex/reparameterization/__init__.py
Class Name:
Method Name: apply_reparameterization


Project Name: unitedstates/congress-legislators
Commit Name: c21a9d813073e35ec1a588d34ab911cbea808299
Time: 2017-10-26
Author: tcarobruce@gmail.com
File Name: scripts/office_validator.py
Class Name:
Method Name: check_legislator_offices


Project Name: tyarkoni/pliers
Commit Name: 3ab4b8614054e9920676ae479df1ff4c2c2e438b
Time: 2018-02-13
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api.py
Class Name: IndicoAPIExtractor
Method Name: _extract