#### What is TensorFlow and Why Do We Need One

###### Posted By : Prince Verma | 19-Mar-2019

TensorFlow is a software package library for building computational graphs to implement machine learning. We can think of TensorFlow as a toolkit for implementing a new machine learning algorithm, while other deep learning tools are for using an algorithm implemented by other people. That doesn't mean we have to build everything from scratch. TensorFlow comes with a collection of reusable building blocks, there are other libraries such as Keras that provide convenient modules on top of TensorFlow.

Many other tools work at a higher level of abstraction. For instance, you can design a neural network by connecting a different kind of "layers". It is functionally similar to that of BNNS and MPSCNN provided on iOS. In TensorFlow, we can also work with such layers but we can go much deeper too, all the way down to the individual computations that make up an algorithm.

So going deep into the math is not a requirement to use TensorFlow, but the option is there if we want to get in our hands dirty.

## Binary classification with logistic regression

We'll create a classifier using the logistic regression algorithm. And yes, we'll be building it from the ground up. A classifier takes in some input data and then tells you which category -- or class -- this data belongs to.

For this demonstration, we have two classes: male or female, and therefore it is a binary classifier. The input data we use consists of 20 numbers that represent various acoustic properties of a particular recording of someone speaking.

In the diagram, we can see that the 20 numbers are connected to a little block called total. The connections have different masses, which corresponds to how important each of these 20 numbers is, according to the classifier.

Have a look into the logistic classifier operation as illustrated below:

Inside the total block, the inputs are x0 to x19 and the weights are w0 to w19. They are summated as follows.

Total = x[0] * w[0] + x[1] * w[1] +  ............... + x[19] * w[19] + b

Further, we add a bias term ‘b’ at the end. This is just another number. The weights in the array ‘w’ and the value ‘b’ represents what the classifier has learned. Training the classifier is a matter of finding the right numbers for ‘w’ and ‘b’. Initially, we start with all w's and b being zero. After many rounds of training, ‘w’ and ‘b’ will contain a set of number that the classifier can use to tell apart male and female speech.

In brief, TensorFlow is an open-source platform for machine learning that has a comprehensive ecosystem of tools and libraries. It enables the developers to deploy ML-powered applications.

##### Related Tags
Request for Proposal