Why is the entire operator API not available for NDArrays? The Symbolic API is used for constructing the computational graph and then executing said graph on NDArrays. Thus, everything is operated on NDArrays anyways. So why aren’t these methods available to NDArrays? This is a question about the MXNet program design.
Edit: These methods are in fact available but it is not clear how to access. A simple example is below for the sum()
function, which performs a sum reduction over an axis. I put this in a local utility file. I suggest someone add this to documentation so that it is more clear to C++ users.
inline mxnet::cpp::NDArray sum(mxnet::cpp::NDArray x, size_t axis = 0) {
mxnet::cpp::NDArray ret;
mxnet::cpp::Operator("sum")(x,axis).Invoke(ret);
return ret;
}