zoukankan      html  css  js  c++  java
  • TensorFlow Cheatsheet

    How to check the current version of TensorFlow?

    This depends on how you installed TensorFlow.

    Pip installation

    Run:

    python -c 'import tensorflow as tf; print(tf.__version__)'  # for Python 2
    python3 -c 'import tensorflow as tf; print(tf.__version__)'  # for Python 3

    Note that python is symlinked to /usr/bin/python3 in some Linux distributions, so use pythoninstead of python3 in these cases.

    pip list | grep tensorflow

     for Python 2 or 

    pip3 list | grep tensorflow

    for Python 3 will also show the version of Tensorflow installed.

    Virtualenv installation

    Run:

    python -c 'import tensorflow as tf; print(tf.__version__)'  # for both Python 2 and Python 3
    pip list | grep tensorflow

    will also show the version of Tensorflow installed.

    For example, I have installed TensorFlow 0.9.0 in a virtualenv for Python 3. So, I get:

    $ python -c 'import tensorflow as tf; print(tf.__version__)'
    0.9.0
    
    $ pip list | grep tensorflow
    tensorflow (0.9.0)
  • 相关阅读:
    第二周总结
    个人总结
    软件设计模式7
    软件设计模式6
    软件设计模式5
    软件设计模式4
    软件设计模式3
    软件设计模式2
    软件设计模式1
    软件构造2
  • 原文地址:https://www.cnblogs.com/casperwin/p/6533828.html
Copyright © 2011-2022 走看看