谷歌colab上默認使用的是2.x版本的tensorflow,要想切換到1.x版本,在ipynb下使用:
%tensorflow_version 1.x
之后可以使用
import tensorflow as tf
tf.__version__
來查看對應的版本