接着记录tensorflow2.0的知识。
更新到最新的版本:
pip install --upgrade tensorflow
pip install --upgrade tensorflow-gpu
查看版本号:
import tensorflow as tf
print("Tensorflow version:",tf.__version__)
print("Eager execution is ",tf.executing_eagerly())
在tensorflow2.0的运行环境中,运行tensorflow1.x代码,常常会出现错误提示:
在tensorflow2.0环境中,运行tensorflow1.x时,加入代码:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
TensorFlow中的Tensor,表示张量,其实就是