Book Image

Hands-On Neural Networks with Keras

By : Niloy Purkait
Book Image

Hands-On Neural Networks with Keras

By: Niloy Purkait

Overview of this book

Neural networks are used to solve a wide range of problems in different areas of AI and deep learning. Hands-On Neural Networks with Keras will start with teaching you about the core concepts of neural networks. You will delve into combining different neural network models and work with real-world use cases, including computer vision, natural language understanding, synthetic data generation, and many more. Moving on, you will become well versed with convolutional neural networks (CNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) networks, autoencoders, and generative adversarial networks (GANs) using real-world training datasets. We will examine how to use CNNs for image recognition, how to use reinforcement learning agents, and many more. We will dive into the specific architectures of various networks and then implement each of them in a hands-on manner using industry-grade frameworks. By the end of this book, you will be highly familiar with all prominent deep learning models and frameworks, and the options you have when applying deep learning to real-world scenarios and embedding artificial intelligence as the core fabric of your organization.
Table of Contents (16 chapters)
Free Chapter
1
Section 1: Fundamentals of Neural Networks
5
Section 2: Advanced Neural Network Architectures
10
Section 3: Hybrid Model Architecture
13
Section 4: Road Ahead

Computing contender memory

We now know how the memory at time (t) is calculated, but how about the contender (c ̴t) itself? After all, it is partially responsible for maintaining a relevant state of memory, characterized by possibly useful representations occurring at each timestep.

This is the same idea that we saw in the GRU unit, where we allow the possibility for memory values to be updated using a contender value at each timestep. Earlier, with the GRU, we used a relevance gate that helped us compute it for the GRU. However, that is not necessary in the case of the LSTM, and we get a much simpler and arguably more elegant formulation as follows:

  • Contender memory value (c ̴t ) = tanh ( Wc [ at-1, t ] + bc)

Here, Wc is a weight matrix that is initialized at the beginning of a training session, and iteratively updated as the network trains. The dot product of...