ccbe24760b4250aabff88168ee6a6b54247bffe5,tensorly/kruskal_tensor.py,,kruskal_normalise,#Any#Any#,104
Before Change
if weights is not None:
factors[0] *= weights
if copy :
weights = T.ones(rank, **T.context(factors[0]))
else:
weights[:] = 1
else:
weights = T.ones(rank, **T.context(factors[0]))
After Change
if copy:
factors = [T.copy(f) for f in factors]
if weights is not None:
factors[0] *= weights
weights = T.ones(rank, **T.context(factors[0]))
for factor in factors:
scales = T.norm(factor, axis=0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: tensorly/tensorly
Commit Name: ccbe24760b4250aabff88168ee6a6b54247bffe5
Time: 2019-08-06
Author: jean.kossaifi@gmail.com
File Name: tensorly/kruskal_tensor.py
Class Name:
Method Name: kruskal_normalise
Project Name: tensorly/tensorly
Commit Name: 5f078112011a66a93432cb6d38c03935a10f382e
Time: 2020-07-10
Author: git@ameyer.me
File Name: tensorly/decomposition/candecomp_parafac.py
Class Name:
Method Name: non_negative_parafac
Project Name: dmlc/dgl
Commit Name: cd484352064fc81e86ceb0ba2eb470e3aa8a72f3
Time: 2020-08-12
Author: coin2028@hotmail.com
File Name: python/dgl/transform.py
Class Name:
Method Name: to_simple