Tensorflow History, Introduction & Architecture

Tensorflow History, Introduction & Architecture

ยท

6 min read

From AI assistants to self-driving cars, tech companies are in a race to launch products and enhance the User Experience by exploring the capabilities of Artificial Intelligence.

Machine learning creates algorithms that enable machines to learn and apply intelligence without being directed, and TensorFlow is an open-source library used for building machine learning models.

In this Introduction & Architecture tutorial, we are going to cover the following:

  1. What is TensorFlow?
  2. History of Tensorflow?
  3. Popular libraries to develop deep learning applications
  4. How Tensorflow works
  5. Tensorflow Architecture
  6. Algorithm Supported by Tensorflow
  7. Hello World by Tensorflow

What is Tensorflow?

Tensorflow is an open-source end-to-end library that was developed by Google Brain Team in 2012. Python and Javascript are by far the most common language that Tensorflow uses.

Latest Tensorflow version: v2.4.1

It is a symbolic math library that uses dataflow and differentiable programming to perform various tasks focused on training and inference of deep neural networks.

Google uses machine learning (in-depth TensorFlow models) in all its products to improve search engine, translation, image captioning, and also in recommendations.

Concrete example:

Google users can experience a faster and more refined search with AI. If the user types a keyword in the search bar, Google provides a recommendation about what could be the next word.

History of Tensorflow

A couple of years ago, deep learning started to outperform all other machine learning when giving a massive amount of data. Google saw it could use these deep neural networks to improve its services like:

  • Google Photo
  • Gmail
  • Search Engine
  • Other products

They build a framework called Tensorflow to let researchers and developers work together on an AI model.

It was first made public in late 2015, while the first stable version appeared in 2017. Since then the library is open-source.

There are specific and lots of libraries available to develop deep learning applications such as:

  • Keras
  • Tensorflow
  • DLJ4
  • Theano
  • Torch

How Tensorflow Works

TensorFlow enables you to build dataflow graphs and structures to define how data moves through a graph by taking inputs as a multi-dimensional array called Tensor.

Note: We will read about Tensor in the upcoming tutorial in depth For now, understand Tensor as a mathematical object represented as arrays of higher dimensions.

It allows you to construct a flowchart of operations that can be performed on these inputs, which go at one end and comes at the other end as output.

Tensorflow Architecture

Tensorflow architecture works in three parts:

  • Preprocessing the data
  • Build the model
  • Train and estimate the model

It is called Tensorflow because it takes input as a multi-dimensional array, also know as Tensors.

You can construct a sort of flowchart of operations (called a Graph) that you want to perform on that input. The input goes in at one end, and then it flows through this system of multiple operations and comes out at the other end as output.

This is why it is called TensorFlow because the tensor goes in it flows through a list of operations, and then it comes out the other side.

Algorithms supported by Tensorflow

Below are the Tensorflow algorithms:

Currently, Tensorflow 2.4.1 has a built-in API for:

1. Linear regression: tf.estimator.LinearRegressor
2. Classification:tf.estimator.LinearClassifier
3. Deep learning classification: tf.estimator.DNNClassifier
4. Deep learning wipe and deep: tf.estimator.DNNLinearCombinedClassifier
5. Booster tree regression: tf.estimator.BoostedTreesRegressor
6. Boosted tree classification: tf.estimator.BoostedTreesClassifier

for more please refer: https://www.tensorflow.org/api_docs/python/tf

Helloww World by Tensorflow

Here we are going to perform computations on the constants, but these tensors won't be evaluated until a session is created and the tensor is run inside the session.

import tensorflow as tf

# Create Tensorflow object called hello_constant
hello_constant = tf.constant('Hello World')

with tf.Session() as sess:
    # Run the tf.constant operation in the session
    output = sess.run(hello_constant)
    print(output)

Next: In the next tutorial, we will read installation setup and depth about tensors and also their operations.