报错如下:
WARNING:tensorflow:You are casting an input of type complex128 to an incompatible dtype float32. This will discard the imaginary part and may not be what you intended.
尝试了很久,都不行
import warnings
warnings.filterwarnings("ignore")
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
最后,终于找到了解决方法
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
运行出来啦!