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

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:

主站蜘蛛池模板: 南雄市| 喀喇沁旗| 龙胜| 舒城县| 宝清县| 苏尼特右旗| 西青区| 德钦县| 淅川县| 林口县| 石渠县| 甘肃省| 恩施市| 汉阴县| 静乐县| 麻城市| 丹凤县| 城市| 利津县| 达日县| 霍州市| 寿光市| 高安市| 邵东县| 重庆市| 陇西县| 铜梁县| 尼勒克县| 鄂尔多斯市| 利辛县| 永嘉县| 云浮市| 惠东县| 乐昌市| 辉县市| 抚州市| 清徐县| 海淀区| 梓潼县| 安仁县| 宣城市|