I am trying to implement one operator, which expects integer input, during testing i observed below behavior.
I modified tutorial/nnvm/get_started.py operation as below:
z = sym.cast(sym.elemwise_add(x, x), dtype=“int32”)
and feeding input as below:
x_np = np.array([[1]]).astype(“float32”)
Post execute output is 3.e-45.
But if i modify operation as below:
z = sym.cast(sym.elemwise_add(x, x), dtype=“float32”)
Now the output is 2.0 which is expected.
My target is “LLVM”.
Anyone else has faced the same issue?
Or is it something i am doing wrong?