You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step by step with same data, but during the execution of that:
low_rank_part, sparse_part = robust_pca(X, n_iter_max=20)
I got:
AssertionError Traceback (most recent call last)
in ()
----> 1 low_rank_part, sparse_part = robust_pca(X, n_iter_max=20)
C:\ProgramData\Anaconda3\lib\site-packages\tensorly\decomposition\robust_decomposition.py in robust_pca(X, mask, tol, reg_E, reg_J, mu_init, mu_max, learning_rate, n_iter_max, random_state, verbose)
76
77 # Initialise the decompositions
---> 78 D = T.zeros_like(X) # low rank part
79 E = T.zeros_like(X) # sparse part
80 L_x = T.zeros_like(X) # Lagrangian variables for the (X - D - E - L_x/mu) term
C:\ProgramData\Anaconda3\lib\site-packages\mxnet\ndarray\register.py in zeros_like(data, out, name, **kwargs)
It seems you are using TensorLy with the MXNet backend but feeding the algorithm NumPy arrays: try to set the backend to numpy (import tensorly as tl; tl.set_backend('numpy')), this should solve your issue.
Hello,
I just execute this sample:
https://jeankossaifi.github.io/tensorly/rpca.html
Step by step with same data, but during the execution of that:
low_rank_part, sparse_part = robust_pca(X, n_iter_max=20)
I got:
AssertionError Traceback (most recent call last)
in ()
----> 1 low_rank_part, sparse_part = robust_pca(X, n_iter_max=20)
C:\ProgramData\Anaconda3\lib\site-packages\tensorly\decomposition\robust_decomposition.py in robust_pca(X, mask, tol, reg_E, reg_J, mu_init, mu_max, learning_rate, n_iter_max, random_state, verbose)
76
77 # Initialise the decompositions
---> 78 D = T.zeros_like(X) # low rank part
79 E = T.zeros_like(X) # sparse part
80 L_x = T.zeros_like(X) # Lagrangian variables for the (X - D - E - L_x/mu) term
C:\ProgramData\Anaconda3\lib\site-packages\mxnet\ndarray\register.py in zeros_like(data, out, name, **kwargs)
AssertionError: Argument data must have NDArray type, but got [[[ 6.79022540e+00 1.77902254e+01 2.17902254e+01 ..., 3.79022540e+00
0.00000000e+00 -2.20977460e+00]
[ 5.79022540e+00 1.67902254e+01 1.57902254e+01 ..., 6.79022540e+00
-5.20977460e+00 -1.02097746e+01]
[ 5.79022540e+00 1.37902254e+01 2.27902254e+01 ..., 4.79022540e+00
-4.20977460e+00 -1.72097746e+01]
...,
[ -5.32097746e+01 -4.42097746e+01 -4.12097746e+01 ..., -3.12097746e+01
-3.72097746e+01 -3.92097746e+01]
[ -5.32097746e+01 -5.32097746e+01 -5.32097746e+01 ..., 2.55000000e+02
-5.02097746e+01 -5.92097746e+01]
[ -6.12097746e+01 -5.92097746e+01 0.00000000e+00 ..., -4.92097746e
...
Thanks
Cheers
The text was updated successfully, but these errors were encountered: