You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/07/29 17:46:38 UTC

[GitHub] [incubator-mxnet] leezu commented on issue #18788: bfloat16 rendered as uint16

leezu commented on issue #18788:
URL: https://github.com/apache/incubator-mxnet/issues/18788#issuecomment-665793579


   MXNet bfloat16 type is registered as having numpy equivalent `np.dtype([('bfloat16', np.uint16)])`:
   
    https://github.com/apache/incubator-mxnet/blob/c1098aa33d6795f84a19601d0319d5bb8e19f317/python/mxnet/ndarray/ndarray.py#L86
   
   As printing a NDArray works via converting to numpy, this causes `bfloat16` arrays to be printed as `uint16`.
   
   The fundamental issue here is that numpy does not support `bfloat16`. We can consider if there is a better solution


----------------------------------------------------------------
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:
users@infra.apache.org