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 2018/09/05 01:44:16 UTC

[GitHub] jasonyu1996 commented on issue #12327: [Feature Request] support of diag for N-d arrays

jasonyu1996 commented on issue #12327: [Feature Request] support of diag for N-d arrays
URL: https://github.com/apache/incubator-mxnet/issues/12327#issuecomment-418571963
 
 
   @samskalicky Yes. Actually I have already implemented one version in this way (https://github.com/apache/incubator-mxnet/pull/12430), simply traversing and copying the data. However, I actually think it more efficient to just generate a new view, as is the case in numpy. The problem here is that MXNet seems to lack a good support for this, as I have reported here 
   https://github.com/apache/incubator-mxnet/issues/12449 .
   
   As for the possible usage of a diagonal operator, as far as I know, it is sometimes necessary to compute a regularizer based on the diagonal of a matrix (or the diagonals of a batch of matrices). `trace` might be sufficient at times, but in other cases, it might be more flexible to operate on the diagonal itself (e.g., when taking norm of the diagonal).

----------------------------------------------------------------
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