Skip to content

Instantly share code, notes, and snippets.

View rrblogdatascience's full-sized avatar

rrblogdatascience

View GitHub Profile
@rrblogdatascience
rrblogdatascience / mxnet_nan_bug.py
Last active February 21, 2018 16:05
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