如何在计算机上找到TensorFlow的版本?

use*_*836 22 tensorflow

在我的计算机上查找TensorFlow版本的命令是什么?我不久前在我的电脑上安装了TensorFlow,并希望确保我有最新版本.

Yar*_*tov 40

import tensorflow as tf
tf.__version__
Run Code Online (Sandbox Code Playgroud)

  • 我们能否知道是否安装了GPU/CPU版本? (4认同)

OmK*_*OmK 10

pip list | grep tensorflow
Run Code Online (Sandbox Code Playgroud)

您可以通过将"tensorflow"替换为库名来查找任何已安装库的版本.


Tri*_*ath 9

$ pip show tensorflow
Name: tensorflow
Version: 1.5.0
Summary: TensorFlow helps the tensors flow
Run Code Online (Sandbox Code Playgroud)