f6415170f7f90124e9cdb9ccd37cd867852b7657,evaluate.py,,,#,15

Before Change


                if not isinstance(batch[key], list):
                    batch[key] = Variable(batch[key].cuda(), volatile=True)

        enc_out = encoder(batch["img_feat"], batch["ques_fwd"], batch["hist"])
        dec_out = decoder(enc_out, batch["opt"])
        // sort in descending order - largest score gets highest rank
        sorted_ranks, ranked_idx = dec_out.data.sort(1, descending=True)

After Change


                        help="Whether to use ground truth for retrieving ranks")
parser.add_argument("-batch_size", default=12, type=int, help="Batch size")
parser.add_argument("-gpuid", default=0, type=int, help="GPU id to use")
parser.add_argument("-overfit", action="store_true",
                        help="Use a batch of only 5 examples, useful got debugging")
parser.add_argument_group("Submission related arguments")
parser.add_argument("-save_ranks", action="store_true",
                        help="Whether to save retrieved ranks")
parser.add_argument("-save_path", default="logs/ranks.json",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: f6415170f7f90124e9cdb9ccd37cd867852b7657
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: evaluate.py
Class Name:
Method Name:


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: f6415170f7f90124e9cdb9ccd37cd867852b7657
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: f6415170f7f90124e9cdb9ccd37cd867852b7657
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: evaluate.py
Class Name:
Method Name:


Project Name: batra-mlp-lab/visdial-challenge-starter-pytorch
Commit Name: 42fc102b56aadde323fa695d35e109c5bfb13e7c
Time: 2018-07-08
Author: karandesai281196@gmail.com
File Name: train.py
Class Name:
Method Name: