microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.49k stars 4.3k forks source link

Sqrt of a negative value return zero instead of NaN #3852

Open River861 opened 3 years ago

River861 commented 3 years ago

Hi, I found that sqrt function in cntk returns 0 instead of NaN for negative numbers, which is different from other deep learning libraries, such as tensorflow and theano. I'm not sure if this is a bug?

>>> import cntk as C
>>> C.sqrt(-1).eval()
array(0., dtype=float32)
>>> C.sqrt(-2).eval()
array(0., dtype=float32)
>>> C.sqrt(-4).eval()
array(0., dtype=float32)

Windows 10 x64, cntk 2.7.0, CPU only.

dmytrobaranovskyi commented 3 years ago

Looks like the project is dead...