9db32ceedaef0873f99b4a7f400e705dd6d64173,theano/sandbox/cuda/tests/test_gemmcorr3d.py,TestCorr3DMM,run_gradinput,#TestCorr3DMM#Any#Any#Any#,260

Before Change



        // Get bottom shape using convTransp3D
        bottom_shape = res_ref.shape
        bottom_val = numpy.random.random(bottom_shape).astype("float32")
        bottom = shared(bottom_val)

        weight = gpu_contiguous(filters.dimshuffle(0, 4, 1, 2, 3))
        top = gpu_contiguous(inputs.dimshuffle(0, 4, 1, 2, 3))
        if (subsample == (1, 1, 1)):
            conv_gemm = GpuCorr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top)
        else:
            conv_gemm = GpuCorr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top,
                shape=bottom.shape[1:4])
        conv_gemm = conv_gemm.dimshuffle(0, 2, 3, 4, 1)
        f = theano.function([], conv_gemm, mode=mode_with_gpu)

        res = f()

After Change


        bottom_height = (inputs_shape[1] - 1) * subsample[0] + filters_shape[1]
        bottom_width = (inputs_shape[2] - 1) * subsample[1] + filters_shape[2]
        bottom_depth = (inputs_shape[3] - 1) * subsample[2] + filters_shape[3]
        bottom_shape = theano.shared(numpy.array([bottom_height, bottom_width, bottom_depth]))

        weight = gpu_contiguous(filters.dimshuffle(0, 4, 1, 2, 3))
        top = gpu_contiguous(inputs.dimshuffle(0, 4, 1, 2, 3))
        if (subsample == (1, 1, 1)):
            conv_ref = Corr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top)
            conv_gemm = GpuCorr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top)
        else:
            conv_ref = Corr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top,
                shape=bottom_shape)
            conv_gemm = GpuCorr3dMM_gradInputs(subsample=subsample)(
                kern=weight, topgrad=top,
                shape=bottom_shape)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Theano/Theano
Commit Name: 9db32ceedaef0873f99b4a7f400e705dd6d64173
Time: 2016-10-12
Author: gvtulder@gmail.com
File Name: theano/sandbox/cuda/tests/test_gemmcorr3d.py
Class Name: TestCorr3DMM
Method Name: run_gradinput


Project Name: broadinstitute/keras-rcnn
Commit Name: b5f576591e59ea7ca550cd51a08f96d37eb0ebf3
Time: 2017-08-18
Author: jyhung@broadinstitute.org
File Name: tests/test_losses.py
Class Name:
Method Name: test_smooth_l1_loss


Project Name: analysiscenter/batchflow
Commit Name: fab8d83aa1d19d5e40383323a60666a886804c54
Time: 2019-08-16
Author: 7520522+a-arefina@users.noreply.github.com
File Name: batchflow/tests/rebatch_test.py
Class Name:
Method Name: test_rebatch