You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/01/26 00:34:55 UTC

[GitHub] ChaiBapchya commented on issue #13944: how to Compute the eigenvalues and eigenvectors of ndarray/hidden layer?

ChaiBapchya commented on issue #13944: how to Compute the eigenvalues and eigenvectors of ndarray/hidden layer? 
URL: https://github.com/apache/incubator-mxnet/issues/13944#issuecomment-457781413
 
 
   @weihua04 
   Our discussion forum is a good place for these questions. But regardless, here's the answer
   On our documentation - https://mxnet.incubator.apache.org/api/python/ndarray/linalg.html
   `mxnet.ndarray.linalg.syevd` seems to be the function for your usecase.
   
   Documentation on the website also gives the following 2 examples
   ```
   // Single symmetric eigendecomposition
   A = [[1., 2.], [2., 4.]]
   U, L = syevd(A)
   U = [[0.89442719, -0.4472136],
        [0.4472136, 0.89442719]]
   L = [0., 5.]
   
   // Batch symmetric eigendecomposition
   A = [[[1., 2.], [2., 4.]],
        [[1., 2.], [2., 5.]]]
   U, L = syevd(A)
   U = [[[0.89442719, -0.4472136],
         [0.4472136, 0.89442719]],
        [[0.92387953, -0.38268343],
         [0.38268343, 0.92387953]]]
   L = [[0., 5.],
        [0.17157288, 5.82842712]]
   ```
   
   Hope this helps. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services