lanking520 commented on issue #11126: [MXNET-386] ongoing maintenance on NDArray
URL: https://github.com/apache/incubator-mxnet/pull/11126#issuecomment-394895328
 
 
   In the most recent two commits, I have made some modification on the NDArray 
Macros. In the past, I have placed all variables into the Kwargs and the 
backend does not accept that. However, after I have modify the 
`GenericFuncInvoke` function, @yzhliu point out the issues that we may not 
correctly track the order of NDArray. In this case, I have reverted the change 
on this function and change the Macros as follows, here I give an example of a 
function called `Activation`
   ```Scala
   def Activation (data : org.apache.mxnet.NDArray, act_type : String, out : 
Option[NDArray] = None) : org.apache.mxnet.NDArrayFuncReturn = {
     val map = scala.collection.mutable.Map[String, Any]()
     val args = scala.collection.mutable.ArrayBuffer.empty[NDArray]
     args.append(data)
     map("act_type") = act_type
     if (!out.isEmpty) map("out") = out
     genericNDArrayFunctionInvoke("Activation", args.toSeq, map.toMap)
   }
   ```
   As you can see, a new args variable defines there to store all NDArray into 
a Array. It will further pass to the `GenericFuncInvoke` and place in the 
`ndArgs` method. This will ensure the order.
   
   I also put the experimental tag into an individual folder called 
`annotation`. 
   
   Please keep an eye on #11123 PR, this is the only we for us to figure out 
the new NDArray API Implementation is correct or not. Since `make scalatest` 
will run them. I kept them synchronized

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to