Deep Learning with Keras

Deep Learning lies at the heart of many leading machine learning and artificial intelligence applications. This course, Deep Learning with Keras, shows you how to use Keras to quickly create powerful deep neural networks.
Course info
Rating
(50)
Level
Intermediate
Updated
Mar 26, 2018
Duration
2h 33m
Table of contents
Description
Course info
Rating
(50)
Level
Intermediate
Updated
Mar 26, 2018
Duration
2h 33m
Description

There has been a revolution in artificial intelligence (AI) and machine learning, and deep learning-based solutions are leading the charge. Implementing these solutions can be tedious to create and require you to write many lines of complex code. Keras is a library that makes it much easier for you to create these deep learning solutions. In a few lines of code, you can create a model that could require hundreds of lines of conventional code. This course, Deep Learning with Keras, will get you up to speed with both the theory and practice of using Keras to implement deep neural networks. First, you will dive deep into learning how Keras implements various layers of neurons quickly and easily, with each layer defining the specific functionality needed to implement parts of your solution. Next, you will discover how to use Keras’ various methods for interconnecting these layers to form the structure of your deep neural networks. Finally, you will learn how you use Keras to implement several state-of-the-art neural networks, such as the widely used Convolutional and Recurrent Neural Networks, to make these concepts come to life. By the end of this course, you will gain the skills and experience required to effectively create deep neural networks through the course’s combination of lecture and hands-on coding.

About the author
About the author

Jerry Kurata is a Solutions Architect at InStep Technologies.

More from the author
TensorFlow: Getting Started
Beginner
2h 38m
May 3, 2017
More courses by Jerry Kurata
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi, my name is Jerry Kurata and welcome to my course Deep Learning with Keras. Deep learning lies at the heart of the most advanced machine learning solutions, such as those that have learned to recognize items and images, determine the sentiment of text, and drive vehicles. These neural networks are complex and can be challenging to build, but Keras removes much of the effort. Keras acts as an API, letting us quickly create a network that might take hours or days to hand code in Python or other languages. In this course, you'll be introduced to the Keras deep learning API and see how it handles much of the complexities of creating deep neural networks. You'll learn how Keras leverages the power of popular deep learning frameworks like TensorFlow, CNTK, and Theano. To learn Keras we will start by creating simple models that are easy to understand. Once we have the basics down, we'll use more and more Keras features to create more and more powerful models. By the end of this course you'll be able to create models that perform among the best at complex tasks, such as image recognition and detecting the true sentiment of reviews, even when they are draped in sarcasm. And by utilizing Keras's powerful models and layers, you will see how easy this is to do. So please join me in this journey to learn how to create powerful deep neural networks with Deep Learning with Keras at Pluralsight.

Introducing Keras
Hello, my name is Jerry Kurata. Welcome to this course on Deep Learning with Keras. In this course you learn about Keras, a machine learning library that you can use to create deep learning models that can solve many complex problems. By using Keras, you can quickly create deep learning models that can perform numerous tasks, such as identifying objects and images, and even creating captions for those images, determining the sentiment of text, even when that sentiment is buried under a layer of sarcasm, and of course, acting as the logic in self driving vehicles, identifying possible conflicts, helping to ensure that the vehicle can safely and swiftly get you to your destination. Solving problems like these is not a trivial task, but Keras makes the process straightforward and quick. We will see how in the next clip where we go into exactly what Keras is.

Constructing Models in Keras
Hello and welcome to this module about the Keras model. We briefly saw how to use the Keras sequential model when we created our first neural network. In that example we created a simple neural network that used a minimal amount of the model's capabilities. In this module we'll dive deeper into the Keras model. We will see that there are two types of models available in Keras, the sequential model we used previously and the model class used with functional API. The sequential model is easy to understand. We define the sequential model and then add a sequence of layers. As we will see a minute, the connections between the layers are automatically made and managed. The end result is that we can easily and quickly create a neural network, but there are times when we need a more complex neural network, one that is composed of functional units. For these, the sequential model is not sufficient and we use the model class with functional API. This lets us create complex neural networks in which we can arrange the layers into functional units that each perform a part of the solution and define the inner connection between the units to create the best solution. The result is a more complex and detailed neural network with enough power to solve complex problems. Now that we understand a bit more about the construction of models, let's go back to our code and see how to handle more complex problems.

Employing Layers in Keras Models
In this module we look at the various layers available in Keras and how we use them to effectively construct our models. As we know, these layers of neurons provide the intelligence of our network and through training with data, weights and bias of these layers are adjusted to provide the best solution. In Keras, layers are built on a common layer object and thus share some common methods. These common methods include these, which allow getting and setting the weights and configuration of the layer. Get_weights returns the weight of the layer. Set_weights sets the weights of the layer from a list of numpy arrays. Get_config returns a dictionary containing the configuration for the layer. And from_config can reinstantiate this layer from the configuration dictionary. You can also get a list of input and output tensors and their associated shapes. Input gets the input tensor, output gets the output tensor. Input shape gets a shape of the input tensor, and output shape gets a shape of the output tensor. being shared using the functional API, you can get information on specific layer from these functions, get_input_at, get_output_at, get_input_shape_at, get_output_shape_at. Each of these use the node index to indentify the specific layer. Now that we have seen the features common to all layers, let's look at the features of specific layers.

Building Convolutional NN with Keras
As we discussed in the last module, Keras has a series of layers that were specifically created to support convolutional neural networks. So that begs the question, which is a convolutional neural network? Wikipedia has the following definition of convolutional neural networks, or CNNs. Let's parse this definition a bit. From this we see we're talking about deep neural networks. In fact, CNNs are always deep networks, having two or more hidden layers. And often are quite deep with some having dozens of hidden layers. And how about this part of the definition, as it shows the original purpose of convolutional neural networks was to support analysis of images. Later we will talk about how this definition has expanded to support different types of data, but for now let's focus on images. Specifically, let's talk about what makes images different and why we need CNNs to process them.

Implementing Recurrent Neural Nets with Keras
We have see how we can build neural networks that can solve many problems, and how using Keras makes it easier to support both simple models with fully connected layers and complex convolutional networks. But thus far we have ignored one big factor, namely that a lot of data has dependencies upon previous data values, that is, there is a sequential dependency by a current value and the previous values. Examples of this include stock or other commodity prices where the previous price affects the current price, forecasting weather where the current weather impacts future weather, and text prediction where the next word a user will type is based on the word they just entered. And if you think about it for a minute, you can probably come up with other cases where the current value depends on knowing the previous values. When we try to apply fully connected layers to these prediction problems, they usually do not work well. This is because they do not track the sequence of data. That is, they do not have the concept of what came before and do not have a way to remember previous data values, like the stock price at the last trade. To solve these problems, we use a special type of neural network known as a recurrent neural network, or RNN. In the next clip we'll go over the structure of recurrent neural networks and how they let us work with sequential data.