Last active
February 21, 2018 16:05
-
-
Save rrblogdatascience/08d922d32ff0e8c4f4de84dc8e9dd666 to your computer and use it in GitHub Desktop.
mxnet - nan resulting if we square a negative number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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