Welcome to AI Programming with Python

Start using AI techniques and developing skills related to programming, linear algebra, and neural networks.

Why Python Programming

Start coding with Python, drawing upon libraries and automation scripts to solve complex problems quickly.

Data Types and Operators

Control Flow

Functions

Scripting

Lab Classifying Images

In this project, learners will be testing their newly-acquired Python coding skills by using a trained image classifier. They will need to use the trained neural network to classify images of dogs (by breeds) and compare the output with the known dog breed classification. Learners will have a chance to build their own functions, use command line arguments, test the runtime of the code, create a dictionary of lists, and more.

NumPy

Learn how to use all the key tools for working with data in Python: Jupyter Notebooks, NumPy, Anaconda, Pandas, and Matplotlib.

Pandas

Matplotlib and Seaborn Part 1

Learn how to use Matplotlib to choose appropriate plots for one and two variables based on the types of data you have.

Matplotlib and Seaborn Part 2

Introduction

Learn the foundational math needed for AI success—vectors, linear transformations, and matrices—as well as the linear algebra behind neural networks.

Vectors

Linear Combination

Linear Transformation and Matrices

Vectors Lab

Linear Combination Lab

Linear Mapping Lab

Linear Algebra in Neural Networks

Introduction to Neural Networks

Gain a solid foundation in the latest trends in AI: neural networks, deep learning, and PyTorch.

Implementing Gradient Descent

Training Neural Networks

Deep Learning with PyTorch

Create Your Own Image Classifier

How Do I Continue From Here

Tuples

A tuple is another useful container. It’s a data type for immutable ordered sequences of elements. They are often used to store related pieces of information. Consider this example involving latitude and longitude:

location = (13.4125, 103.866667)
print("Latitude:", location[0])
print("Longitude:", location[1])

Tuples are similar to lists in that they store an ordered collection of objects which can be accessed by their indices. Unlike lists, however, tuples are immutable – you can’t add and remove items from tuples, or sort them in place.

Tuples can also be used to assign multiple variables in a compact way.

dimensions = 52, 40, 100
length, width, height = dimensions
print("The dimensions are {} x {} x {}".format(length, width, height))

The parentheses are optional when defining tuples, and programmers frequently omit them if parentheses don’t clarify the code.

In the second line, three variables are assigned from the content of the tuple dimensions. This is called tuple unpacking. You can use tuple unpacking to assign the information from a tuple into multiple variables without having to access them one by one and make multiple assignment statements.

If we won’t need to use dimensions directly, we could shorten those two lines of code into a single line that assigns three variables in one go!

length, width, height = 52, 40, 100
print("The dimensions are {} x {} x {}".format(length, width, height))