官术网_书友最值得收藏!

TensorFlow

If you have been into machine learning for a while, you will have heard of TensorFlow, or have even used it to build a machine learning model or to feed artificial neural networks. It is an amazing open source project, developed essentially and supported by Google:

The following is the main architecture of TensorFlow, according to the official website:

If it is your first time using TensorFlow, it is highly recommended to visit the project's official website at https://www.tensorflow.org/get_started/. Let's install it on our machine, and discover some of its functionalities. There are many possibilities for installing it; you can use native PIP, Docker, Anaconda, or Virtualenv. 

Let's suppose that we are going to install it on an Ubuntu machine (it also supports the other operating systems). First, check your Python version with the python --version command:

Install PIP and Virtualenv using the following command:

sudo apt-get install python-pip python-dev python-virtualenv

Now, the packages are installed:

Create a new repository using the mkdir command:

#mkdir TF-project

Create a new Virtualenv by typing the following command: 

 virtualenv --system-site-packages TF-project

Then, type the following command:

source  <Directory_Here>/bin/activate

Upgrade TensorFlow by using the pip install -upgrade tensorflow command:

>>> import tensorflow as tf
>>> Message = tf.constant("Hello, world!")
>>> sess = tf.Session()
>>> print(sess.run(Message))

The following are the full steps to display a Hello World! message:

主站蜘蛛池模板: 新乡市| 佛冈县| 项城市| 图们市| 合水县| 阿坝| 大连市| 海兴县| 东丽区| 垣曲县| 阳高县| 黔东| 攀枝花市| 城市| 卓尼县| 甘洛县| 新沂市| 台东县| 涟源市| 奉贤区| 江川县| 盐亭县| 永吉县| 黄平县| 白银市| 武义县| 永靖县| 凌源市| 永城市| 塔城市| 龙游县| 崇仁县| 上蔡县| 名山县| 乌鲁木齐市| 白朗县| 中超| 开化县| 新蔡县| 望谟县| 兰西县|