**根本原因是 tensorflow 1.0 (1.6.0) 和 tensorflow 2.0 版本中的对复数操作的函数使用规则变了 **
1.0版本中可以直接调用 tf.real(); 但2.0版本后该API被移动到tf.math库下面了:tf.math.real().
## 问题如下图所示
tf.math.real / tf.math.imag,是对复数进行取实数/虚数操作。
在tensorflow 1.0版本中,应为:
tf.real()
tf.imag()
在tensorflow 2.0版本中,应为:
tf.math.real()
tf.math.imag()