7929d68e8d79bae487858fef93e81d28aa708d40,lib/model/roi_crop/functions/roi_crop.py,RoICropFunction,forward,#RoICropFunction#Any#Any#,9

Before Change


        else:
            self.device = -1
        self.device_c[0] = self.device
        if not input1.is_cuda:
            roi_crop.BilinearSamplerBHWD_updateOutput(input1, input2, output)
        else:
            output = output.cuda(self.device)
            roi_crop.BilinearSamplerBHWD_updateOutput_cuda(input1, input2, output)
        return output

    def backward(self, grad_output):
        grad_input1 = torch.zeros(self.input1.size())

After Change


        self.input2 = input2.clone()
        output = input2.new(input2.size()[0], input1.size()[1], input2.size()[1], input2.size()[2]).zero_()
        assert output.get_device() == input1.get_device(), "output and input1 must on the same device"
        assert output.get_device() == input2.get_device(), "output and input2 must on the same device"
        roi_crop.BilinearSamplerBHWD_updateOutput_cuda(input1, input2, output)
        return output

    def backward(self, grad_output):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: 7929d68e8d79bae487858fef93e81d28aa708d40
Time: 2017-12-20
Author: jyang375@t1000.cc.gatech.edu
File Name: lib/model/roi_crop/functions/roi_crop.py
Class Name: RoICropFunction
Method Name: forward


Project Name: kymatio/kymatio
Commit Name: 9ec51b207165d135d34bedfc69049909861bd4be
Time: 2019-03-03
Author: janden@flatironinstitute.org
File Name: kymatio/scattering1d/tests/test_utils.py
Class Name:
Method Name: test_modulus


Project Name: lcswillems/torch-rl
Commit Name: 907a86e9c4af4ad476c9d4a7201f87f01b835f0d
Time: 2018-04-14
Author: lcswillems@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: dnouri/skorch
Commit Name: 4a9b13fbf302eace156a1c664a41ab7f51c5cb89
Time: 2018-05-02
Author: marian.tietz@ottogroup.com
File Name: skorch/utils.py
Class Name:
Method Name: to_tensor