The following lines work:
t1 = tf.constant([-2.0, -1.0, 0, 1.0, 2.0], dtype=tf.complex128)
tf.sqrt(t1)
print(t1)
Now if I use
t1 = tf.range(-2.0, 3.0, 1, dtype=tf.complex128)
tf.sqrt(t1)
print(t1)
I get the usual error :
Node:{{node Range}} All kernels registered for op Range :
device='CPU'; Tidx in [DT_FLOAT] device='CPU'; Tidx in [DT_DOUBLE]
device='CPU'; Tidx in [DT_INT32] device='CPU'; Tidx in [DT_INT64]
device='GPU'; Tidx in [DT_FLOAT] device='GPU'; Tidx in [DT_DOUBLE]
device='GPU'; Tidx in [DT_INT32] device='GPU'; Tidx in [DT_INT64]
device='XLA_CPU_JIT'; Tidx in [DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF] device='XLA_GPU_JIT'; Tidx in [DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF]
device='XLA_CPU'; Tidx in [DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF] device='XLA_GPU'; Tidx in [DT_FLOAT, DT_DOUBLE, DT_INT32, DT_INT64, DT_BFLOAT16, DT_HALF] [Op:Range]
What am I doing wrong?