095d3f9114c79d77782c7fed377af9b59b7db6c8,catalyst/utils/distributed.py,,process_components,#Any#Any#Any#Any#Any#Any#,152

Before Change


                if dp in amp_params:
                    amp_params[dp] = distributed_params[dp]

            amp_result = apex.amp.initialize(model, optimizer, **amp_params)
            if optimizer is not None:
                model, optimizer = amp_result
            else:
                model = amp_result

After Change


        elif isinstance(model, dict):
            model = {k: torch.nn.DataParallel(v) for k, v in model.items()}
    elif use_apex:
        model, optimizer = initialize_apex(
            model, optimizer, **distributed_params
        )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: catalyst-team/catalyst
Commit Name: 095d3f9114c79d77782c7fed377af9b59b7db6c8
Time: 2020-02-13
Author: andrey.sheka@gmail.com
File Name: catalyst/utils/distributed.py
Class Name:
Method Name: process_components


Project Name: dmlc/gluon-cv
Commit Name: 4999f9795af7a21ca69adf5f72301b79f719498e
Time: 2018-06-05
Author: 8041160+zhanghang1989@users.noreply.github.com
File Name: gluoncv/model_zoo/pspnet.py
Class Name: PSPNet
Method Name: __init__