30a0e7b4b572b1a48d64d2f7f3574493fd3c7d56,train.py,,train,#Any#,32

Before Change


    iteration = infos["iter"]
    epoch = infos["epoch"]
    loader.iterators = infos.get("iterators", loader.iterators)
    loader.split_ix = infos.get("split_ix", loader.split_ix)
    if opt.load_best_score == 1:
        best_val_score = infos.get("best_val_score", None)
    if opt.noamopt:
        optimizer._step = iteration

After Change


    // For back compatibility
    if "iterators" in infos:
        infos["loader_state_dict"] = {split: {"index_list": infos["split_ix"][split], "iter_counter": infos["iterators"][split]} for split in ["train", "val", "test"]}
    loader.load_state_dict(infos["loader_state_dict"])
    if opt.load_best_score == 1:
        best_val_score = infos.get("best_val_score", None)
    if opt.noamopt:
        optimizer._step = iteration
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: 30a0e7b4b572b1a48d64d2f7f3574493fd3c7d56
Time: 2019-12-26
Author: rluo@ttic.edu
File Name: train.py
Class Name:
Method Name: train


Project Name: ruotianluo/self-critical.pytorch
Commit Name: 79fc09d66d3f4736b9fb4f5756a78725719f3808
Time: 2017-02-10
Author: rluo@ttic.edu
File Name: train.py
Class Name:
Method Name: train