c571066f4b0cb46f5aef7f4fa280e1ffabb24172,theano/tensor/opt_uncanonicalize.py,,local_alloc_dimshuffle,#Any#,106
Before Change
new_order = input_.owner.op.new_order
flag = False
for i, dim in enumerate(new_order_bool):
if i == 0 and dim == "x":
flag = True
elif dim == "x" and flag:
continue
elif i > 0 and flag:
flag = False
elif i > 0 and not dim == "x":
continue
else:
return False
return input_.owner.inputs
return False
After Change
// check if it only adds dimension to the left
new_order = input_.owner.op.new_order
expected_new_order = ("x",) * (input_.ndim - input_.owner.inputs[0].ndim) + \
tuple(range(input_.owner.inputs.ndim) )
if new_order != expected_new_order:
return False
return input_.owner.inputs
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: Theano/Theano
Commit Name: c571066f4b0cb46f5aef7f4fa280e1ffabb24172
Time: 2016-09-30
Author: oli.mastro@gmail.com
File Name: theano/tensor/opt_uncanonicalize.py
Class Name:
Method Name: local_alloc_dimshuffle
Project Name: deepchem/deepchem
Commit Name: 624dfb1a1263e5539d30112e2ba7344957b9b20f
Time: 2020-07-20
Author: peastman@stanford.edu
File Name: deepchem/feat/coulomb_matrices.py
Class Name: CoulombMatrix
Method Name: coulomb_matrix
Project Name: lmcinnes/pynndescent
Commit Name: c0a393e873fb6bbf469fc83fc563aba785c2f246
Time: 2019-09-12
Author: leland.mcinnes@gmail.com
File Name: pynndescent/pynndescent_.py
Class Name:
Method Name: initialized_nnd_search