3dba9054b3c7bf4b9edabb430eb457a07e05b6ca,tensorly/mps_tensor.py,,mps_to_tensor,#Any#,8
Before Change
n_mode_dimensions = mps_get_n_mode_dimensions(factors)
D = len(n_mode_dimensions)
(r0, n1, r1) = factors[0].shape
output_tensor = factors[0]
output_tensor = tl.reshape(output_tensor, (n1, r1))
for k in range(1, D):
(r_prev, n_k, r_k) = factors[k].shape
G_k = tl.reshape(factors[k], (r_prev, n_k * r_k))
output_tensor = tl.dot(output_tensor, G_k)
output_tensor = tl.reshape(output_tensor, (-1, r_k))
output_tensor = tl.reshape(output_tensor, n_mode_dimensions)
return output_tensor
After Change
for factor in factors[1:]:
rank_prev, _, rank_next = factor.shape
factor = tl.reshape(factor, (rank_prev, -1))
full_tensor = tl.dot(full_tensor, factor)
full_tensor = tl.reshape(full_tensor, (-1, rank_next))
return tl.reshape(full_tensor, full_shape)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: tensorly/tensorly
Commit Name: 3dba9054b3c7bf4b9edabb430eb457a07e05b6ca
Time: 2018-07-05
Author: jean.kossaifi@gmail.com
File Name: tensorly/mps_tensor.py
Class Name:
Method Name: mps_to_tensor
Project Name: pymanopt/pymanopt
Commit Name: 04f7a2ae65a7f4c43153452922a8fae2c4b555d1
Time: 2016-07-28
Author: jamiehntownsend@gmail.com
File Name: tests/test_manifold_fixed_rank.py
Class Name: TestFixedRankEmbeddedManifold
Method Name: test_proj
Project Name: SeanNaren/deepspeech.pytorch
Commit Name: e30b50ff849a417b8e70d121edd2e85f0565eee1
Time: 2017-09-13
Author: jinserk.baik@gmail.com
File Name: data/data_loader.py
Class Name: NoiseInjection
Method Name: inject_noise_sample
Project Name: mne-tools/mne-python
Commit Name: 0656d8eef747ecb0d86631c18675feba3ab1fcae
Time: 2019-02-15
Author: alexandre.gramfort@m4x.org
File Name: mne/simulation/evoked.py
Class Name:
Method Name: _generate_noise