I tried to create some very basic mxnet code that should only initialize a variable and output the same.
The issue is, I can't get the initialization done.
I pass the initializer as parameter to Variable as indicated in the mxnet docs
I already tried to use different initializers like Xavier, One, Uniform but all results are the same [0,0,0,0] output.
import mxnet as mx
cst = mx.init.Constant(value=2)
a = mx.sym.Variable('A', init=cst)
executor = a.simple_bind(ctx=mx.cpu(), A=(1,4))
executor.forward()
Output:
[[ 0. 0. 0. 0.]]
<NDArray 1x4 @cpu(0)>]
However I would expect the output to be [2, 2, 2, 2]
Any idea about what's going on here is most welcome.