Nowadays, Tensorflow is a highly demanded skill in the market, ensuring ease of production, standardizing some crucial stages of Machine Learning.

Today you’ll learn how to make your first neural network with Tensorflow; We’re going to build a Multilayer Perceptron model, also called the “Vanilla” Neural Network. Are you ready? So let’s start!

Tensorflow is a platform that focuses on Machine Learning, providing tools to create models for different ecosystems; With this, you can run Machine Learning models on mobile devices, cloud, servers, and more. Let’s check out the definition of Tensorflow by Google:

“TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications.”

It’s important to know that Tensorflow provides libraries and extensions for several situations; One of the most used is the Tensorflow Hub, which allows Machine Learning Engineers to reuse already trained models to train new ones, using the Transfer Learning method.

What is a Neural Network?

Generally, the easiest way to explain them is to say that they’re related to neurons in the animal brain but created by engineers, using the name Artificial Neural Network (ANN).

Designed to recognize patterns, they act like neurons, triggering when one is detected. Artificial Neural Networks are based on the animal’s Central Nervous System but not identical, just similar. It’s a common mistake when talking about neural networks.

Neural networks are composed of input, hidden and output layers; The Input Layer is the first, where our data is added; The hidden layers are the “neurons” that adjust the weight and bias for each epoch; Finally, it’s in the output layer that we receive a response from our model, based on the target.

Epoch is the number of times our Machine Learning model pass through the entire training data; Inside each epoch, the weight and bias are computed in order to make our model find better patterns.

If you’re new to Neural Networks, check out this Google playground; You can modify the number of epochs, activation, learning rate, and more (without breaking your model).

The Multilayer Perceptron

Today we will be building a Multilayer Perceptron (MLP), also called the “Vanilla” Neural Network; **By default, this type of MLP has only a single hidden layer **and looks like the gif above.

Being one of the simplest types of neural networks, the Multilayer Perceptron is perfect to understand how a neural network works and each step of the entire process.

The Google Colaboratory

We’ll use Google Colab, a tool based on the Jupyter Notebook that allows data scientists to work quickly and intelligently. By default, Google Colab comes with the necessary packages to work with Data Science and Machine Learning.

Also, it is a great tool for anyone who focuses on performance: Google offers a GPU that speeds up processes. Simply put,** you don’t have to worry about installing packages, machine memory, or backup**, Google saves your progress to your Google Drive account.

Structure of Today’s Project

To make it easier, we’ll work on a regression data; I’ll just focus on creating our Multilayer Perceptron, but you can click here to check out other steps, like Data Cleaning and Feature Engineering, for example.

About our Data

We’ll use the “Auto MPG” data provided by UCI, click here to take a look. We’ll predict the miles per gallon (MPG) parameter based on 7 different features.

#neural-networks #keras #machine-learning #data-science #tensorflow

How to Create a Vanilla Neural Network with Tensorflow
12.85 GEEK