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

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:

主站蜘蛛池模板: 阿拉善右旗| 朝阳县| 新泰市| 上栗县| 宝清县| 陇川县| 鄂伦春自治旗| 湟中县| 陆河县| 平利县| 电白县| 榆林市| 扬州市| 永川市| 尖扎县| 聂拉木县| 固安县| 阳高县| 双鸭山市| 新邵县| 荥经县| 三台县| 保山市| 盈江县| 锦州市| 深州市| 古蔺县| 溧水县| 长子县| 宁乡县| 亳州市| 张家川| 万源市| 磐安县| 聂荣县| 宁夏| 西乌珠穆沁旗| 兴安盟| 应城市| 台前县| 札达县|