a4566752a9207c7769e00c97e08f905d601f27e9,pymanopt/tools/multi.py,,multiprod,#,5
Before Change
if len(np.shape(A)) == 2:
return np.dot(A, B)
a = A.reshape(np.hstack([np.shape(A), [1]]))
b = B.reshape(np.hstack([[np.shape(B)[0]], [1], np.shape(B)[1:]]))
return np.sum(a * b, axis=2)
def multitransp(A):
After Change
//return np.sum(a * b, axis=2)
// Approx 5x faster, only supported by numpy version >= 1.6:
return np.einsum("ijk,ikl->ijl", A, B)
def multitransp(A):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: pymanopt/pymanopt
Commit Name: a4566752a9207c7769e00c97e08f905d601f27e9
Time: 2016-02-15
Author: jamiehntownsend@gmail.com
File Name: pymanopt/tools/multi.py
Class Name:
Method Name: multiprod
Project Name: rasbt/mlxtend
Commit Name: a3a539ed60af074ea3459835c788c2e900f3d8c1
Time: 2019-03-31
Author: ackerleytng@gmail.com
File Name: mlxtend/classifier/stacking_cv_classification.py
Class Name: StackingCVClassifier
Method Name: predict_meta_features
Project Name: explosion/thinc
Commit Name: 912a2acca1b0fddbf20eadee77c27c2093a8748d
Time: 2020-01-21
Author: honnibal+gh@gmail.com
File Name: thinc/optimizers.py
Class Name: Optimizer
Method Name: _adam