What does TensorFlow offer characteristically?

Vidhi Chugh
3 min readFeb 13, 2022

With Python code implementation

Photo by Compare Fibre on Unsplash

There are several deep learning frameworks like PyTorch, Keras, TensorFlow, Caffe, Theano, etc. We will be discussing TensorFlow, what are its key characteristics, and conclude with a working example.

Tensor is a multi-dimensional data array/tensor whereas flow implies the flow of data in operation. Hence, TensorFlow defines the flow of data or tensors on which numerical computations are done with graphs.

In these graphs, nodes represent mathematical operations, while the edges represent the data, which usually are multidimensional data arrays or tensors, that are communicated between these edges.

Control dependencies are the special edges where no data flows, they enforce the source node to finish execution before the destination node starts executing for the control dependence.

The computation using TensorFlow can be performed on multiple systems like phones and tablets to large-scale distributed systems such as GPUs.

Key characteristics of TensorFlow:

  • Open-sourced Machine Learning and deep learning framework written in python, developed by Google
  • A single system that provides computational scalability across a broad range of applications like mobile device platforms such as Android, iOS to mid-size systems with single machines containing one or many GPUs to large-scale systems with thousands of GPUS.
  • It supports fast debugging and model building
  • It works efficiently with multi-dimensional arrays.
  • It can be used for the training and inference of deep neural networks. It provides ease of quick implementation for research work as well as provides high-performing and robust production systems.
  • It allows parallel execution of a core model dataflow graph, where different computational devices collaborate to update a set of shared parameters.
  • Image classification, RNN, NLP, video classification, etc. are some of its prevalent applications.
  • IMHO, the key reason to use TensorFlow is its vast community

Operations:

It is an abstract name for computations like matrix multiplication, or addition. It has attributes that instantiate a node at the time of graph construction.

Author

Shapes and Ranks of different entities:

Author

Constants

Variables:

Tensors exist only during a single execution of the graph, wherein the graph undergoes several computations and needs Variables to handle tensors during multiple executions in a graph. For example, the parameters of the machine learning model are stored in tensors in variables. The Variables are updated as part of the run of the model training graph

Getting comfortable with tensors:

Random normal and uniform tensors:

I hope this article would have given you an understanding of what are tensors, why TensorFlow is a deep learning framework is preferred given its characteristics.

We also learned how tensors can be used as a basic building component. In the next article, we will build a deep learning model using TensorFlow.

Till then, happy learning.

Reference:

https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45166.pdf

🟠 Become a Writer at MLearning.ai

--

--

Vidhi Chugh

Data Transformist and AI Strategist | International Speaker | AI Ethicist and Data-Centric Scientist | Global Woman Achiever https://allaboutscale.com/