Skip to main content

Tensorflow

What is Tensorflow

TensorFlow is an end-to-end open-source platform for machine learning that provides a comprehensive, flexible ecosystem of tools, libraries, and community resources that allows researchers and developers to build and deploy ML-powered applications easily.

Screenshot 2021-10-04 at 9 34 53 PM

How TensorFlow Works

It enables you to build dataflow graphs and structures which defines how the data moves through the graph by taking inputs as a multi-dimensional array called as Tensor. It helps you in constructing a flowchart of operations which are performed on the inputs at one end and it comes out from the other end as the output. It is called TensorFlow because the tensor flows through a list of operations, and then it comes out from the other side as the output.

TensorFlow Architecture

Tensorflow architecture works in three parts:

Preprocessing the data Build the model Train and estimate the model

Where can Tensorflow run?

Depending on hardware and software requirements tensorflow can be classified into:

  1. Development Phase: In the development phase you train the model and it is done on your laptop or desktop usually.

  2. Run Phase or Inference Phase: After the training is done it can be run on many different platforms such as Windows, macOS or Linux , cloud as a web service and on iOS and Android mobile devices. It can be trained on multiple machines and can be run on a machine which is different from the one on which you trained the model. It can be trained and used on GPUs as well as CPUs.

Advantages of Tensorflow

  • Easy model building
  • Robust ML production anywhere
  • Powerful experimentation for research
  • You can also use it for javascript, mobile and IoT devices as well

TensorFlow Components

Tensor

In Tensorflow, all the computations use tensors. A tensor is a vector (1-d array )or matrix of n-dimensions which represents all kinds of data. All the values in a tensor have the same data type with a known shape. The dimensionality of the matrix shape of the data.A tensor can also be formed by using input data or the result of a computation.

A tensor consists of a node and an edge. The node consists of the mathematical operation and it produces an endpoint outputs. The edges are used for describing the relationship between input/output nodes.

Graphs

TensorFlow uses a graph framework and it conducts all the operations inside the graph. It is a set of computation which takes place one after another. Here each operation is called as an op node and they are connected to each other. But the graph does not display any values. The graph collects and describes all the series computations which are done during the training.

Advantages of graphs:

  • It can run on multiple CPUs or GPUs and even on mobile operating system
  • It is portable,due to which it can be saved and executed in the future.
  • We can perform computations in a graph by connecting the tensors.

TensorFlow Algorithms

  • Linear regression: tf.estimator.LinearRegressor
  • Classification:tf.estimator.LinearClassifier
  • Deep learning classification: tf.estimator.DNNClassifier
  • Deep learning wipe and deep: tf.estimator.DNNLinearCombinedClassifier
  • Booster tree regression: tf.estimator.BoostedTreesRegressor
  • Boosted tree classification: tf.estimator.BoostedTreesClassifier