Hi TongKe, These are operators defined in the c++ backend under src/operator. For example convolution is here https://github.com/apache/incubator-mxnet/blob/master/src/operator/convolution.cc . The operators are registered using nnvm, which helps automatically generate the frontend functions.
This tutorial on how to add a backend operator <https://github.com/apache/incubator-mxnet/blob/master/docs/how_to/add_op_in_backend.md> contains information on how to register such operators, which would help you understand the above file. An excerpt from there (for quadratic operator) : "If you use python, when you type import mxnet as mx, two python functions for invoking your backend implementation are generated on the fly: one is for imperative programming registered as mxnet.ndarray.quadratic or mx.nd.quadratic for short; the other one is for symbolic programming registered under module mxnet.symbol.quadratic or mx.sym.quadratic for short." I'd think the Scala package works similarly. Regards, Rahul On Wed, Oct 18, 2017 at 5:06 PM, TongKe Xue <[email protected]> wrote: > My earlier question was a bit messy. > > To rephrase my question: > > 1. Scala AlexNet sample code calls Symbol.Convolution: > > https://github.com/apache/incubator-mxnet/blob/master/ > scala-package/examples/src/main/scala/ml/dmlc/mxnetexamples/visualization/ > AlexNet.scala#L30 > > 2. Symbol.scala does not contain the string "Convolution" > > https://github.com/apache/incubator-mxnet/blob/master/ > scala-package/core/src/main/scala/ml/dmlc/mxnet/Symbol.scala#L982 > > Question: where/how is Symbol.Convolution defined? > > On Wed, Oct 18, 2017 at 4:10 PM, TongKe Xue <[email protected]> wrote: > > Hi, > > > > I am reading: https://mxnet.incubator.apache.org/api/scala/symbol.html > > > > I see Symbol.Variable, Symbol.Convolution > > > > When I look at Symbol.scala, I see Symbol.Variable at: > > https://github.com/apache/incubator-mxnet/blob/master/ > scala-package/core/src/main/scala/ml/dmlc/mxnet/Symbol.scala#L982 > > > > However, I can't find where Convolution, SoftMax, FullyConnected, ... > > are defined. > > > > Where are these Symbols defined? > > > > (I have also tried: grep "Convolution" . -R | grep scala | grep def -- > > but found nothing). > > > > Thanks, > > --TongKe > -- Rahul Huilgol
