954766f611adb31bb123188691c76c3c7c2c3ea6,paysage/backends/pytorch_backend/matrix.py,,dot,#Any#Any#,227

Before Change


        return b[0, index[0,0]]

def dot(a,b):
    dims = ndim(a) * ndim(b)
    if dims == 4:
        // matrix-matrix product
        return torch.mm(a, b)
    elif dims == 2:
        // matrix-vector product
        return torch.mv(a, b)
    elif dims == 1:
        // vector-vector product
        return torch.dot(a, b)
    else:
        raise ValueError("Cannot determine appropriate matrix product")

def outer(x,y):
    return torch.ger(x, y)

def affine(a,b,W):

After Change


        return b[0, index[0,0]]

def dot(a, b):
    return a @ b

def outer(x,y):
    return torch.ger(x, y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: drckf/paysage
Commit Name: 954766f611adb31bb123188691c76c3c7c2c3ea6
Time: 2017-03-02
Author: charleskennethfisher@gmail.com
File Name: paysage/backends/pytorch_backend/matrix.py
Class Name:
Method Name: dot


Project Name: scipy/scipy
Commit Name: 7e2ddf86c5f8df9642f330e4a1d09f838e953306
Time: 2017-04-20
Author: nikolay.mayorov@zoho.com
File Name: scipy/integrate/_py/lsoda.py
Class Name: LsodaDenseOutput
Method Name: _call_impl


Project Name: tensorly/tensorly
Commit Name: b1f90776bd41b6319818f65aba5536b81e8b5c8d
Time: 2019-04-23
Author: jean.kossaifi@gmail.com
File Name: tensorly/tenalg/n_mode_product.py
Class Name:
Method Name: unfolding_dot_khatri_rao