Skip to content

Instantly share code, notes, and snippets.

@rrblogdatascience
Last active February 21, 2018 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrblogdatascience/08d922d32ff0e8c4f4de84dc8e9dd666 to your computer and use it in GitHub Desktop.
Save rrblogdatascience/08d922d32ff0e8c4f4de84dc8e9dd666 to your computer and use it in GitHub Desktop.
mxnet - nan resulting if we square a negative number
import mxnet as mx
from mxnet import nd
a = nd.array([-2,1], ctx=mx.gpu(0))
print(a)
# first record will be nan on windows
print(nd.power(a,2))
# first record will be nan on windows
print(a ** 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment