Intro to Deep Learning with TensorFlow

Mario Sanchez

Mario Sanchez

· 5 min read
Intro to Deep Learning with TensorFlow Tutorial

Introduction

Have you ever wondered what powers ChatGPT? What technology developers are using to create self-driving cars? How your phone can recognize faces? Why it seems like your photos app is better at recognizing your friends’ faces than even you can? What is behind all of this? Is it magic? Well, not exactly; it is a powerful technology called deep learning (DL). Let’s dive in and see what this is all about!

What is Deep Learning?

Deep Learning (DL) is a special part of Machine Learning that uses computer networks inspired by how our brains work. Deep Learning is great at automatically learning patterns from information, and it's especially good at tasks like recognizing images and understanding language.

Deep Learning vs. Machine Learning

First, let’s focus on learning. If you have come across machine learning before, you might be familiar with the concept of a learning model. Learning describes the process by which models analyze data and finds patterns. A machine learning algorithm learns from patterns to find the best representation of this data, which it then uses to make predictions about new data that it has never seen before.

Deep learning is a subfield of machine learning, and the concept of learning is pretty much the same.

  • We create our model carefully
  • Throw relevant data at it
  • Train it on this data
  • Have it make predictions for data it has never seen

Deep learning models are used with many different types of data, such as text, images, audio, and more, making them applicable to many different domains.

What does “deep” mean?

That leaves the question: what is this “deep” aspect of deep learning? It separates deep learning from typical machine learning models and why it is a powerful tool that is becoming more prevalent in today’s society.

The deep part of deep learning refers to the numerous “layers” that transform data. This architecture mimics the structure of the brain, where each successive layer attempts to learn progressively complex patterns from the data fed into the model. This may seem a bit abstract, so let’s look at a concrete example, such as facial recognition. With facial recognition, a deep learning model takes in a photo as an input, and numerous layers perform specific steps to identify whose face is in the picture. The steps taken by each layer might be the following:

  1. Find the face within the image using edge detection.
  2. Analyze the facial features (eyes, nose, mouth, etc.).
  3. Compare against faces within a repository.
  4. Output a prediction!
Image

Graphics Processing Units

One final thing to note about deep learning is that with large amounts of data and layers of complexity, you may imagine that this takes a lot of time and processing power. That intuition would be correct. These models often require high-performance GPUs (graphics processing units) to run in a reasonable amount of time. These processors have a large memory bandwidth and can process multiple computations simultaneously. CPUs can run deep learning models as well; however, they will be much slower.

What are Neural Networks?

Neural networks are computational models composed of interconnected nodes or artificial neurons, organized into layers. Each connection between nodes has a weight associated with it, and the network learns to adjust these weights during training to make accurate predictions.

Image

Input Layer

The first layer that receives the initial data or features.

Hidden Layers

Layers between the input and output layers where complex transformations and feature learning occur.

Output Layer

The final layer that produces the model's output or prediction.

Neurons/Nodes

Basic processing units that receive inputs, apply a weighted sum, and pass the result through an activation function.

Weights and Biases

Weights are parameters that the network learns during training to assign importance to different inputs. Biases are additional parameters that help the network account for certain inputs even when all inputs are zero.

Activation Function

An activation function introduces non-linearity to the model, allowing it to learn complex relationships in the data.

The next thing is to learn math behind the deep learning.

Mario Sanchez

About Mario Sanchez

Mario is a Staff Engineer specialising in Frontend at Vercel, as well as being a co-founder of Acme and the content management system Sanity. Prior to this, he was a Senior Engineer at Apple.

Copyright © 2024 Stablo. All rights reserved.
Made by Stablo