You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/09/05 15:18:36 UTC

[GitHub] asmushetzel commented on a change in pull request #7741: New operators linalg_syrk, linalg_gelqf

asmushetzel commented on a change in pull request #7741: New operators linalg_syrk, linalg_gelqf
URL: https://github.com/apache/incubator-mxnet/pull/7741#discussion_r137020459
 
 

 ##########
 File path: src/operator/tensor/la_op.cc
 ##########
 @@ -95,33 +96,33 @@ NNVM_REGISTER_OP(_backward_linalg_gemm)
 NNVM_REGISTER_OP(_linalg_gemm2)
 .add_alias("linalg_gemm2")
 .describe(R"code(Performs general matrix multiplication.
-Input are two tensors *A*, *B* each of dimension *n >= 2* and each
-having the same shape on the leading *n-2* dimensions. For every *n-2* dimensional index *i* let
-*A*\ :sub:`i`\ , *B*\ :sub:`i`\  be the matrices given by the last *2* dimensions.
-The operator performs the BLAS3 function *gemm* (restricted to two arguments)
+Input are tensors *A*, *B*, each of dimension *n >= 2* and having the same shape
+on the leading *n-2* dimensions.
+
+If *n=2*, the BLAS3 function *gemm* is performed:
 
-   *out*\ :sub:`i` = *alpha* \* *op*\ (*A*\ :sub:`i`\ ) \* *op*\ (*B*\ :sub:`i`\ )
+   *out* = *alpha* \* *op*\ (*A*) \* *op*\ (*B*)
 
-on all such pairs of matrices. Here *alpha* is a scalar operator parameter and *op()* is either
-the identity or the matrix transposition.
+Here *alpha* is a scalar parameter and *op()* is either the identity or the matrix
+transposition (depending on *transpose_a*, *transpose_b*).
 
-In case of *n=2*, a single *gemm* function is performed on the matrices *A*, *B*.
+If *n>2*, *gemm* is performed separately on the trailing two dimensions for all inputs
+(batch mode).
 
-.. note:: The operator does only support float32 and float64 data types and provides
-          proper backward gradients.
+.. note:: The operator supports float32 and float64 data types only.
 
 Examples::
 
    // Single matrix multiply
    A = [[1.0, 1.0], [1.0, 1.0]]
    B = [[1.0, 1.0], [1.0, 1.0], [1.0, 1.0]]
-   gemm2(A, B, transpose_b = 1, alpha = 2.0)
 
 Review comment:
   Apparently some general renaming has happened recently for namespace reasons. All documentation now uses function names without linalg_prefix.
 
----------------------------------------------------------------
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