42f67ff9068c3bc92e53f2d624c2bc755de4470f,bootstrap/engines/engine.py,Engine,eval_epoch,#Engine#Any#Any#Any#Any#Any#,179

Before Change


            Logger().log_value("eval_batch.timer.load", timer["load"], should_print=False)

            for key, value in out.items():
                if type(value) == torch.autograd.variable.Variable:
                    value = value.data
                if torch.is_tensor(value):
                    if value.dim() != 1 or value.size(0) != 1:

After Change


                if torch.is_tensor(value):
                    if value.dim() == 0:
                        //value = value.detach() // not tracked by autograd anymore
                        value = value.item() // get number from a torch scalar
                    else:
                        continue
                if type(value) == list:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Cadene/bootstrap.pytorch
Commit Name: 42f67ff9068c3bc92e53f2d624c2bc755de4470f
Time: 2018-05-20
Author: remi.cadene@icloud.com
File Name: bootstrap/engines/engine.py
Class Name: Engine
Method Name: eval_epoch


Project Name: Cadene/bootstrap.pytorch
Commit Name: 42f67ff9068c3bc92e53f2d624c2bc755de4470f
Time: 2018-05-20
Author: remi.cadene@icloud.com
File Name: bootstrap/engines/engine.py
Class Name: Engine
Method Name: train_epoch


Project Name: kengz/SLM-Lab
Commit Name: ec849adaf4ceb42ed52ca142c839f627c34b9434
Time: 2018-05-21
Author: kengzwl@gmail.com
File Name: slm_lab/agent/algorithm/algorithm_util.py
Class Name:
Method Name: act_with_softmax