本文共 366 字,大约阅读时间需要 1 分钟。
代码实践《tensorflow实战GOOGLE深度学习框架》时,由于本机安装的tensorflow为2.0版本与配套书籍代码1.4的API不兼容,只得将tensorflow降级为1.4.0版本使用,降级方法如下
1 pip uninstall tensorflow 2 pip install tensorflow==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 验证import tensorflow as tf
print(tf.version) 二 从别的版本升级到2.0 自动卸载与其相关包 pip uninstall tensorflow 安装某版本 pip install --no-cache-dir tensorflow==x.xx (此处填写2.0) 验证转载地址:http://lifti.baihongyu.com/