Incorrect behaviour of tf.nn.sigmoid
on complex inputs
#61800
Labels
comp:ops
OPs related issues
stat:awaiting response
Status - Awaiting response from author
TF 2.13
For issues related to Tensorflow 2.13
type:bug
Bug
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
tf v1.12.1-96406-gfa4d29bfef8 2.14.0-dev20230706
Custom code
Yes
OS platform and distribution
WSL Ubuntu 20.04.5 LTS
Mobile device
No response
Python version
No response
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
tf.nn.sigmoid
gives incorrect values for complex numbers with large, negative real parts (which should map to within a rounding error of 0). For example, whenx = -709-1j
(complex128
) I expecttf.nn.sigmoid(x) = 0
, but insteadtf.nn.sigmoid(x) = 1
.Standalone code to reproduce the issue
import tensorflow as tf x = tf.constant([-709-1j], dtype=tf.complex128) tf.nn.sigmoid(x) # <tf.Tensor: shape=(1,), dtype=complex128, numpy=array([1.+0.j])>
Relevant log output
No response
The text was updated successfully, but these errors were encountered: