sxjscience opened a new issue #18398:
URL: https://github.com/apache/incubator-mxnet/issues/18398
Reproducible example:
```python
import mxnet as mx
mx.npx.set_np()
net = mx.gluon.nn.Dense(16, in_units=32)
net.collect_params()
net.cast(mx.np.float16)
net.initialize()
```
Error:
```
~/mxnet/python/mxnet/numpy/random.py in uniform(low, high, size, dtype, ctx,
out)
135 inequality condition.
136 """
--> 137 return _mx_nd_np.random.uniform(low, high, size=size, ctx=ctx,
dtype=dtype, out=out)
138
139
~/mxnet/python/mxnet/ndarray/numpy/random.py in uniform(low, high, size,
dtype, ctx, out)
135 if size == ():
136 size = None
--> 137 return _api_internal.uniform(low, high, size, ctx, dtype, out)
138
139
~/mxnet/python/mxnet/_ffi/_ctypes/function.py in __call__(self, *args)
113 self.handle, values, tcodes, ctypes.c_int(num_args),
114 ctypes.byref(ret_val), ctypes.byref(ret_tcode)) != 0:
--> 115 raise get_last_ffi_error()
116 _ = temp_args
117 _ = args
MXNetError: Traceback (most recent call last):
File "../src/imperative/./imperative_utils.h", line 262
MXNetError: Check failed: outputs[i]->dtype() == out_types[i] (2 vs. 0) :
0-th output has invalid dtype. Expecting 0 got 2 in operator _npi_uniform
```
----------------------------------------------------------------
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:
[email protected]