d4fce4f5f1b9c164de6a873dbb877d46e00c75e1,keras/backend/theano_backend.py,,batch_dot,#Any#Any#Any#,114

Before Change




def batch_dot(x, y, axes=None):
    if ndim(x) != 3 or ndim(y) != 3:
        raise Exception("batch_dot supports only 3D tensor. " +
                        "Input1 dim is {}, Input2 ndim is {}.".format(
                            ndim(x), ndim(y)))
    if axes is None:
        // behaves like tf.batch_matmul as default
        axes = [(2,), (1,)]
    return T.batched_tensordot(x, y, axes=axes)

After Change


def batch_dot(x, y, axes=None):
    if axes is None:
        // behaves like tf.batch_matmul as default
        axes = [(x.ndim-1,), (y.ndim-2,)]
    return T.batched_tensordot(x, y, axes=axes)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: keras-team/keras
Commit Name: d4fce4f5f1b9c164de6a873dbb877d46e00c75e1
Time: 2016-03-24
Author: eder@macbook.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: batch_dot


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


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