TaoLv commented on issue #15930: Fix dtype inference in arange_like operator URL: https://github.com/apache/incubator-mxnet/pull/15930#issuecomment-522246438 @eric-haibin-lin Did you observe any crash with fp16 input? With below code snippet, it doesn't seem to crash but just gives numpy.float32 output: ```python import mxnet as mx import numpy as np x = mx.sym.Variable('x', dtype=np.float16) y = mx.sym.reshape(x, shape=(0, 0, -1)) z = mx.sym.contrib.arange_like(y, axis=-1) mod = z.simple_bind(ctx=mx.gpu(0), x=(3, 4, 5, 6), graph_req='null') mod.arg_arrays[0][:] = np.random.normal(size=mod.arg_arrays[0].shape).astype(np.float16) out = mod.forward(is_train=False) print(out[0].dtype) ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services