589950b1125c4561b3ec7480cc1f71bfb85249a8,opt_einsum/backends/shared.py,,tensordot,#Any#Any#Any#,79

Before Change


def tensordot(x, y, axes=2):
    backend = _CURRENT_BACKEND[0]
    cache = _SHARING_STACK[-1]
    cache["tensor", id(x)] = x
    cache["tensor", id(y)] = y

    if isinstance(axes, numbers.Number):
        axes = list(range(len(x.shape)))[len(x.shape) - axes:], list(range(len(y.shape)))[:axes]

After Change




def tensordot(x, y, axes=2):
    _save_tensors(x, y)

    // hash based on the (axes_x,axes_y) form of axes
    if isinstance(axes, numbers.Number):
        axes = list(range(len(x.shape)))[len(x.shape) - axes:], list(range(len(y.shape)))[:axes]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dgasmith/opt_einsum
Commit Name: 589950b1125c4561b3ec7480cc1f71bfb85249a8
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/backends/shared.py
Class Name:
Method Name: tensordot


Project Name: dgasmith/opt_einsum
Commit Name: 589950b1125c4561b3ec7480cc1f71bfb85249a8
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/backends/shared.py
Class Name:
Method Name: transpose


Project Name: dgasmith/opt_einsum
Commit Name: 589950b1125c4561b3ec7480cc1f71bfb85249a8
Time: 2018-08-20
Author: fritzo@uber.com
File Name: opt_einsum/backends/shared.py
Class Name:
Method Name: einsum