Python AI: How to Build a Neural Network & Make Predictions

Python AI: How to Build a Neural Network & Make Predictions

by Déborah Mesquita Updated Reading time estimate 38m intermediate ai data-science machine-learning

If you’re just starting out in the artificial intelligence (AI) world, then Python is a great language to learn since most of the tools are built using it. Deep learning is a technique used to make predictions using data, and it heavily relies on neural networks. Today, you’ll learn how to build a neural network from scratch.

In a production setting, you would use a deep learning framework like TensorFlow or PyTorch instead of building your own neural network. That said, having some knowledge of how neural networks work is helpful because you can use it to better architect your deep learning models.

In this tutorial, you’ll learn:

  • What artificial intelligence is
  • How both machine learning and deep learning play a role in AI
  • How a neural network functions internally
  • How to build a neural network from scratch using Python

Let’s get started!

Take the Quiz: Test your knowledge with our interactive “Python AI: How to Build a Neural Network & Make Predictions” quiz. You’ll receive a score upon completion to help you track your learning progress:


Interactive Quiz

Python AI: How to Build a Neural Network & Make Predictions

Check your grasp of how neural networks make predictions in Python, from dot products and activation functions to gradient descent and backpropagation.

Artificial Intelligence Overview

In basic terms, the goal of using AI is to make computers think as humans do. This may seem like something new, but the field was born in the 1950s.

Imagine that you need to write a Python program that uses AI to solve a sudoku problem. A way to accomplish that is to write conditional statements and check the constraints to see if you can place a number in each position. Well, this Python script is already an application of AI because you programmed a computer to solve a problem!

Machine learning (ML) and