aab3902d4a7d55f5a86058854adc36b8a12c873f,catalyst/dl/utils.py,UtilsFactory,unpack_checkpoint,#Any#Any#Any#Any#Any#,132

Before Change


        checkpoint, model=None, criterion=None, optimizer=None, scheduler=None
    ):
        if model is not None:
            if isinstance(model, torch.nn.DataParallel):
                model = model.module
            if isinstance(model, Fp16Wrap):
                model.network.load_state_dict(checkpoint["model_state_dict"])
            else:
                model.load_state_dict(checkpoint["model_state_dict"])

        for dict2load, name2load in zip(
            [criterion, optimizer, scheduler],
            ["criterion", "optimizer", "scheduler"]
        ):

After Change


        checkpoint, model=None, criterion=None, optimizer=None, scheduler=None
    ):
        if model is not None:
            model = real_module_from_maybe_ddp(model)
            model.load_state_dict(checkpoint["model_state_dict"])

        for dict2load, name2load in zip(
            [criterion, optimizer, scheduler],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 11

Instances


Project Name: Scitator/catalyst
Commit Name: aab3902d4a7d55f5a86058854adc36b8a12c873f
Time: 2019-05-20
Author: ekhvedchenya@gmail.com
File Name: catalyst/dl/utils.py
Class Name: UtilsFactory
Method Name: unpack_checkpoint


Project Name: Scitator/catalyst
Commit Name: aab3902d4a7d55f5a86058854adc36b8a12c873f
Time: 2019-05-20
Author: ekhvedchenya@gmail.com
File Name: catalyst/dl/utils.py
Class Name: UtilsFactory
Method Name: pack_checkpoint


Project Name: catalyst-team/catalyst
Commit Name: aab3902d4a7d55f5a86058854adc36b8a12c873f
Time: 2019-05-20
Author: ekhvedchenya@gmail.com
File Name: catalyst/dl/utils.py
Class Name: UtilsFactory
Method Name: unpack_checkpoint