cedf2caddd84592416b1e487690f28e04c77e94f,basicsr/utils/util.py,,check_resume,#Any#Any#,17

Before Change


    logger = get_root_logger()
    if opt["path"]["resume_state"]:
        // ignore pretrained model paths
        if opt["path"].get("pretrain_model_g") is not None or opt["path"].get(
                "pretrain_model_d") is not None:
            logger.warning(
                "pretrain_model path will be ignored during resuming.")

After Change


        // set pretrained model paths
        for network in networks:
            name = f"pretrain_{network}"
            basename = network.replace("network_", "")
            opt["path"][name] = osp.join(opt["path"]["models"],
                                         f"net_{basename}_{resume_iter}.pth")
            logger.info(f"Set {name} to {opt["path"][name]}")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: xinntao/BasicSR
Commit Name: cedf2caddd84592416b1e487690f28e04c77e94f
Time: 2020-10-03
Author: wxt1994@126.com
File Name: basicsr/utils/util.py
Class Name:
Method Name: check_resume


Project Name: facebookresearch/ParlAI
Commit Name: a3e1b9ff48de1f610ade4ec44f25966dca5cb880
Time: 2017-06-07
Author: willfeng@fb.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: __init__


Project Name: OpenNMT/OpenNMT-tf
Commit Name: f0d767eeccb697243e7f5b6fdf5570871c535ddc
Time: 2019-01-04
Author: guillaume.klein@systrangroup.com
File Name: opennmt/runner.py
Class Name: Runner
Method Name: _make_estimator