Curious What is TensorFlow? Understand the background and basics! (Part-1)
- Sarthak Niwate
- Oct 22, 2020
- 3 min read
Tensorflow is essentially a massive library that is used to incorporate machine learning into projects that means it provides high-level APIs and data.

It is a bunch of variables, functions, and classes that will help us to build computational work and run our actual model. It provides a bunch of built-in datasets and gives us easy access to those datasets. Now one of the great things about TensorFlow is that it is comprised of a large number of platforms so, for example, you can use it in Python on Jupiter Notebook as well as Pycharm.
We can also incorporate it into stuff like mobile projects like imposing into Android studio and a web application using JavaScript. It not only gives us the freedom to build and run the model but also to train the data ourselves. This is not the end but the functions and classes of TensorFlow do a lot of work on back and that work we just can't imagine.
Tensorflow is built around the idea of tensors. Tensors are basic units of data within TensorFlow. This we can essentially think of as a base of primitive values, arrays of strings, arrays of numbers, and so on and so forth. This is how we input our data into the models.

This means any kind of data that we are inputting in, it can be images, audios, text, or something like this. That can be converted into tensors, arrays. This will look simple working with only numerical models for example work as a text prediction model.
Say taking an array of text and we have to divide that array of text into smaller strings that might represent single words.
Similarly, we are feeding stuff like image data and then we can convert the image data into arrays of pixel values or RGB values.
Either way, the data we feed, it needs to be in a tensor format. This can be of a lot of challenges to convert your data into which, the type of data that we can feed to our model.
Building a program into TensorFlow can be divided into two tasks:
Building Graph with Nodes
The first part is the hardest part as per my knowledge and experience and the reason behind that is, it's a pretty complex process to take a lot of different parameters into the consideration and finding the optimum model. This can be the toughest task to do sitting in the chair at the office.
This is, unfortunately, something that comes with practice and only practice and also experience in using TensorFlow. And the best optimum model is very often not clear to swim through the process.
What is the thought? When you listen to that building a graph?
This is not about the x and y-axis of the graph. These are computational graphs which can build a network of interconnected nodes. So to brush up the basics search something like a computer science graph.
All computational models are built entirely around a graph of nodes so each of these nodes takes 0+ tensors or arrays as input. Also, we need to specify the model type that we want to use, what will be our input parameters or values, and the expected output.
Say for example we are building an image recognition model to feed in images like a dog, car, and expected output can be the words that will represent the images.
Another important and last part is that we need to specify the parameters that we want to use to optimize the model.
For example, linear regression which everyone knows from school days says.. line equation is y=mx+c
where x can be the input value and y will be the output value and parameters on which model to optimize would be our m which is slope and c which is our y-intercept.
After building the model, we have to take some data for the training and some data for testing.
Generally, the thought is, that we have to divide our entire data into about 80:20 split. Where training data will be 80% and testing data will be 20%
We can check in this step that, how much our model is accurate or the accuracy of predicting the correct output.
The TensorFlow is like a Black Hole or the Bermuda Triangle, that it can take a lot of weeks, months to train and test the data, and still, maybe the model doesn't suit.
So as to expect the best out of TensorFlow you need to do practice and study the basics of it thoroughly.
Basic errors can be the input values we put in or the parameters which are used to optimize the model. This is difficult to understand that how challenging the building can be without seeing the actual model right in front of us.
Tensorflow is a big step and we are lucky that we can access it freely. This is the future, mark my words!
In part 2, we will know more about the second task which is running the graph.
Stay connected!
Comments