d867603ddfaba66d65aeaaa0f81361292670f74d,code/HardNet.py,,train,#,350

Before Change


        if load_triplets:
            data_a, data_p, data_n = data
            if args.cuda:
                data_a, data_p, data_n  = data_a.cuda(), data_p.cuda(), data_n.cuda()
            data_a, data_p, data_n = Variable(data_a), Variable(data_p), Variable(data_n)
            out_a, out_p, out_n = model(data_a), model(data_p), model(data_n)

            if args.hard_mining:

After Change


            out_a, out_p = model(data_a), model(data_p)

        if load_triplets:
            data_n  = data_n.cuda()
            data_n = Variable(data_n)
            out_n = model(data_n)

        if args.batch_reduce == "L2Net":
            loss = loss_L2Net(out_a, out_p, anchor_swap = args.anchorswap,
                    margin = args.margin, loss_type = args.loss)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 12

Non-data size: 3

Instances


Project Name: DagnyT/hardnet
Commit Name: d867603ddfaba66d65aeaaa0f81361292670f74d
Time: 2017-10-12
Author: xu.zhang@columbia.edu
File Name: code/HardNet.py
Class Name:
Method Name: train


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


Project Name: hunkim/PyTorchZeroToAll
Commit Name: d7e3a11e6ccc8db172b7ba1e9d0115d724156819
Time: 2017-10-19
Author: yunjey47@naver.com
File Name: 11_3_hello_rnn_gpu.py
Class Name:
Method Name:


Project Name: hunkim/PyTorchZeroToAll
Commit Name: 2f23e024d9cfd680ecbfbc006b4c5caafb1c0a3c
Time: 2017-10-21
Author: hunkim@gmail.com
File Name: 11_3_hello_rnn_gpu.py
Class Name: RNN
Method Name: forward


Project Name: leftthomas/SRGAN
Commit Name: 7298957a66d6f6cbe2a81577cea39c1b812d78c1
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: test.py
Class Name:
Method Name:


Project Name: 1adrianb/face-alignment
Commit Name: 478c38823785db76ca85c059cd455a23a586b663
Time: 2017-09-21
Author: 1adrianb@users.noreply.github.com
File Name: face_alignment/api.py
Class Name: FaceAlignment
Method Name: get_landmarks


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 7fffa98b9166a03b4a53fb40202d97b09e8e9036
Time: 2018-05-29
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: hunkim/PyTorchZeroToAll
Commit Name: 2f23e024d9cfd680ecbfbc006b4c5caafb1c0a3c
Time: 2017-10-21
Author: hunkim@gmail.com
File Name: 11_3_hello_rnn_gpu.py
Class Name:
Method Name:


Project Name: leftthomas/SRGAN
Commit Name: 7298957a66d6f6cbe2a81577cea39c1b812d78c1
Time: 2017-11-21
Author: leftthomas@qq.com
File Name: train.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 5751edd199f20c17a366c0eed4932539b3697c18
Time: 2021-01-26
Author: pbelevich@fb.com
File Name: distributed/rpc/rnn/rnn.py
Class Name: EmbeddingTable
Method Name: forward


Project Name: jacobgil/pytorch-grad-cam
Commit Name: c5f4a946052ac81bda7c9e8d15ea1cd891a6200a
Time: 2020-12-26
Author: jacob.gildenblat@gmail.com
File Name: gradcam.py
Class Name: GradCam
Method Name: __call__


Project Name: hunkim/PyTorchZeroToAll
Commit Name: d7e3a11e6ccc8db172b7ba1e9d0115d724156819
Time: 2017-10-19
Author: yunjey47@naver.com
File Name: 11_3_hello_rnn_gpu.py
Class Name: RNN
Method Name: forward