## Introduction to Tensorflow

TensorFlow is one of the most popularly used open-source libraries originally developed by Google, which performs numerical computation using data flow graphs. In the era of Artificial Intelligence, TensorFlow comes with strong support for both machine and deep learning. Python-based can run deep neural networks for image recognition, word embedding, handwritten digit classification, and creation of various sequence models. Its flexible architecture allows easy deployment of computation across various platforms like CPUs, GPUs(Graphics Processing Unit*)*, and clusters of servers. TensorFlow can be used to create algorithms to visualize objects and train a machine to recognize the object. It can also use the data to understand the patterns and behavior from large datasets and deploy sentiment analysis models. As Machine Learning has wide use nowadays, many organizations are using Tensorflow.

### Main Components of Tensorflow

In the above section, we have studied Introduction to TensorFlow; Now, we are going ahead with TensorFlow’s main components. Tensors are the main components in TensorFlow. They are defined as a multidimensional array or list, which are the TensorFlow language’s basic data structures. The connecting edges in any flow diagram, called the Data Flow Graph, are Tensors. These are multi-linear maps which can be anything from vector spaces to real numbers. So a tensor can be a scalar or vector, or matrix.TensorFlow programs are usually structured into a construction phase that assembles a graph and an execution phase that uses a session to execute.

The following three parameters identify tensors:

#### 1. Rank

The unit of dimensionality described within the tensor is called a rank. It identifies the number of dimensions of the tensor.

#### 2. Shape

The number of rows and columns together define the shape of the Tensor.

#### 3. Type

The type describes the data type assigned to Tensor’s elements.

For building a Tensor, we need to consider building an n-dimensional array and converting the n-dimensional array. The various dimensions in the introduction to TensorFlow are as follows.

**One Dimensional Tensor:**

It is a normal array structure that includes one set of values of the same data type.

**Two Dimensional Tensor:**

For creating a two-dimensional Tensor, the sequence of arrays is used.

It is important to understand that the graph and sessions get created, managing the Tensors and generating the appropriate output. With the help of the graph, we have the output specifying the mathematical calculations between Tensors. Graphs save computation by only fetching the values we require by running the specific subgraphs, facilitate distributed computation, dividing the work across multiple devices. Also, many common machine learning models are visualized as graphs.

### Characteristics of Tensorflow

As we discussed the introduction to Tensorflow, Now we are going to learn about the characteristics of Tensorflow, which are as below:

- With TensorFlow, the visualization of the graph becomes easier as compared to other libraries like Numpy etc.
- TensorFlow is an open-source library that offers flexibility in terms of modularity in operation.
- Easily trainable on CPU as well as GPU for distributed computing.
- TensorFlow provides Parallel Neural Network Training, which makes the models efficient on large-scale systems.
- It has a feature column that helps in bridging input data with the model.
- Provides an extensive suite of functions and classes that allow users to define models from scratch.
- With TensorBoard, a different representation of a model can be evaluated, and the changes necessary can be made while debugging it.
- TensorFlow separates the definition of computations from their execution.

### Applications of Tensorflow

TensorFlow can build any type of Deep Learning algorithms like CNN, RNN, DBN, FeedForward Neural Network, Natural Language Processing, etc. There are several programming elements in introducing TensorFlow like Constants, Variables, Placeholders, Sessions, etc. It has a wide range of applications, some of which are mentioned below.

- Speech Recognition Systems
- Image/Video Recognition
- Self Driving Cars
- Text Summarization
- Sentiment Analysis
- Deep neural network for search ranking
- Mobile image and video processing
- Massive multitask networks for drug discovery.
- Optical character recognition for real-time translation

### Advantages And Disadvantages of Tensorflow

As we have studied the characteristics and introduction to TensorFlow now we are going to understand the advantages and disadvantages of TensorFlow are as follows** :**

#### Advantages of Tensorflow

- The TensorFlow library comes with a suite of visualization tools – TensorBoard, for better computational graph visualizations.
- Open-source library for complex analysis.
- TensorFlow supports multiple client languages: JavaScript, Python, C++, Go, Java, and Swift.
- The advantage of seamless performance, quick updates, and frequent new releases with new features.
- Provides a good debugging method as it executes subparts of a graph that facilitates introducing and retrieving discrete data onto an edge.
- Libraries can be deployed on a range of hardware (cellular devices, computers with complex setups)
- Highly parallel neural network which ensembles large distributed systems.
- TensorFlow allows sharing a trained model easily.

### Disadvantages of Tensorflow

- TensorFlow does not offer symbolic loops, but there is a workaround using finite unfolding (bucketing).
- Windows users need to install TensorFlow using python package library, pip, as it is more suitable for Linux users.
- Lacks in both speed and usage when compared to its competitors.
- Currently, the only supported GPUs are of NVIDIA.
- The only full language support is of Python, which is a drawback as there is an increase in other languages’ number in deep learning.
- Though TensorFlow is more powerful and better for Deep Learning but is not suitable for simpler tasks.

### Recommended Articles

This has been a guide on Introduction to Tensorflow. Here we have discussed Introduction to Tensorflow with the main components, characteristics, advantages, and disadvantages of Tensorflow. You may also look at the following articles to learn more –