Algorithm, code, and mathematical complexities: introduction TENSORFLOW
For more articles on “libraries for artificial intelligence” look for the title “Algorithm, code, and mathematical complexities:” introduction with the name of the library that interests you.
In this article we will explain what the purpose of the TENSORFLOW library is, and what are the main operations for which this library provides a solution. In addition, we will show how to install TENSORFLOW and give some basic commands for the initial game.
So what is the TENSORFLOW library and how does it help us in performing calculation operations in the worlds of artificial intelligence? TENSORFLOW is an open source library for machine learning, developed by Google for building and training neural networks. The library was used for research and development at Google as a replacement for its predecessor, DistBelief. The library has an API (“Keras”) for C and Python languages, and many others.
So what exactly is DistBelief? In 2011, the Google Brain team developed the DistBelief library as a closed source software for deep learning and neural networks. Very quickly the library spread to many companies for research and commercial development needs. After the first successes, Google decided to bring the project to a new level, and gathered a team of computer scientists, including Jeff Dean, with the aim of simplifying and improving the code to make it faster and more durable. The result is TensorFlow. In 2013 Jeffrey Hinton joined the team, and in 2009 a team under his management created an extended backpropagation code, and other improvements that enabled the creation of significantly better quality neural networks, for example a 25% improvement in the speech recognition task.
On November 9, 2015, TensorFlow was released for free use under the Apache 2.0 license. And since then after samples and laboratory experiments, in February 2017 the first version of the TensorFlow library used as a second generation machine learning system by the Google Brain team was released. While the old implementation allowed running on only one device, today TensorFlow is able to run on multiple CPUs as well as GPUs. The TensorFlow library is currently available on all computer operating systems and mobile devices with almost full compatibility.
The computations in TensorFlow are represented by information flow through a state graph. The information flowing in the graph is represented in units and multidimensional arrays. This is also where the name comes from, as a fusion of the word Tensor, a multidimensional array, and the word Flow, a flow.
In May 2016, Google announced the use for deep learning calculations in TensorFlow of hardware to accelerate their development — tensor processor (TPU) in ASIC configuration. The TPU processor is designed to produce good results for low-precision calculations (eg, 8-bit), and is aimed more at using trained networks than training them. It was reported from Google that using TPU resulted in an order of magnitude improvement in performance per watt in machine learning.
In February 2018, Google announced the opening of the use of TPUs on the cloud service they offer Google Cloud Platform.
Writing with TensorFlow allows you to work with an artificial neural network (ANN — Artificial Neural Network), a neuron network or a connection network which is actually a computational mathematical model developed inspired by brain or cognitive processes that occur in a natural neural network and is used in the framework of machine learning. This type of network usually contains a large number of information units linked to each other, connections that often pass through hidden information units, and the form of the link between the units, which contains information about the strength of the connection, simulates the way neurons are connected in the brain.
The use of artificial neural networks is widespread mainly in cognitive sciences, and in various software systems — including: many artificial intelligence systems that perform diverse tasks — character recognition, face recognition, handwriting recognition, capital market forecasting, speech recognition system, image recognition, text analysis and more.
We will present the installation steps of the library.
In Ubuntu we will perform the following actions
- First, we will install the Python language and its working environment
sudo apt updat
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8
sudo apt install python3-venv python3-dev
mkdir mi_tensorflow
cd mi_tensorflow
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pipe
- After installing the Python language and its environment, we will install the library
pip install –upgrade tensorflo
python -c 'import tensorflow as tf; print(tf. version )'
deactivatew
Once it’s ready, you can now start working on the library
IN Windows will perform the following actions
- First, we will install the Python language and its working environment (If you do not have Python installed on your computer, go to the following link to download)
- After you have installed Python on the computer, we will download the library services package
# Requires the latest pi
$ pip install --upgrade pip
# Current stable release for CPU and GPU
$pip install tensorflow
# Or try the preview build (unstable)
$pip install tf-nightlyp
If you don’t know how to work with the service package, click here for the full guide
- Next, we’ll run the Docker image container
docker pull tensorflow/tensorflow:latest # Download latest stable imag
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter # Start Jupyter server e
If you don’t know how to work with the container, click here for the complete guide
Here are some of the starting tasks recommended by the official TensorFlow website to learn how to use the library
- https://www.tensorflow.org/tutorials/quickstart/beginner
- https://www.tensorflow.org/tutorials/keras/classification
- https://www.tensorflow.org/tutorials/load_data/csv
- https://www.tensorflow.org/tutorials/quickstart/advanced
- https://www.tensorflow.org/tutorials/customization/basics
- https://www.tensorflow.org/tutorials/distribute/keras
Important links you should know
For the source code of the library click here https://github.com/tensorflow
Click here for the library’s official website https://www.tensorflow.org/
So what is the TensorFlow library and what is it used for? You are invited to come in and understand how the idea of creating the library unfolded and what are the installation steps required to implement it in our code. In addition, the article includes opening tasks that will help you understand how to access and use the library in your everyday life. For more articles,
please visit the following link https://lnkd.in/dcRvevnQ