美文网首页
Google colab 更改tensorflow版本

Google colab 更改tensorflow版本

作者: 找自己的idea | 来源:发表于2020-03-16 22:30 被阅读0次

Google colab默认导入的tensorflow版本是1.x 而最新版本已经为2.1.0,如果想更改tensorflow版本为2.x则需要加入

%tensorflow_version 2.x
import tensorflow as tf
tf.__version__

之后要重启一下runtime

import os
os.kill(os.getpid(), 9)

试一下吧!!

相关文章

网友评论

      本文标题:Google colab 更改tensorflow版本

      本文链接:https://www.haomeiwen.com/subject/dkcaehtx.html