Other Forms of Deep Learning Tutorial

Welcome to the ninth lesson ‘Other forms of Deep Learning’ of the Deep Learning Tutorial, which is a part of the Deep Learning (with TensorFlow) Certification Course offered by Simplilearn. This lesson explains the functionality of autoencoder and the working of Generative-Adversarial Networks.

Let us begin with the objectives of this lesson.


After completing this lesson on Other forms of Deep Learning, you’ll be able to:

  • Elaborate on the functionality of an autoencoder and its various types.

  • Discuss the working and uses of reinforcement learning.

  • Describe the working of Generative-Adversarial Networks.

In the next section, let us learn the other forms of Deep Learning.

Planning for a career in Deep Learning? Check out our Course Preview now!

Other Forms of Deep Learning

The other forms of Deep Learning are:

  • Autoencoders

  • Reinforcement Learning (RL)

  • Generative Adversarial Networks (GANs)

Let us begin with autoencoders in the next section.


An autoencoder is a special form of the neural network which just copies its input to the output. It may also be called an identity function.

The idea is that in copying input to output, the neural net learns useful properties of the input.

The hidden layer h between the input and output layer is called the code. This represents the information one is trying to learn about the input.


The network has two layers:

Encoder h = f(x)

  • Encodes the data to a hidden layer

  • Learns salient features of an input

Decoder r = g(h) = g(f(x))

  • Decodes the data back from hidden layer to reconstruction of the input

  • “r” is the reconstruction of the input


Traditionally autoencoders are used for :

  • Dimensionality reduction - To reduce the complexity of multi-dimensional data by transforming it to lesser dimensions

  • Feature learning - Learning important properties of the data

  • Generative modeling - Generating new data samples by having learned the features of existing data samples via an autoencoder

Autoencoders are similar to feed-forward networks trained with gradient descent and backpropagation.

It is important to avoid a trivial copy over from input to output. In case of an exact copy over, no useful information about the input will be obtained.

Avoiding Trivial Identity

There are two ways to avoid trivial copy over :

  1. Undercomplete autoencoders

  2. Overcomplete Autoencoders

In the next section, let us discuss the undercomplete autoencoders.

Undercomplete Autoencoders

In this autoencoder, h has a lower dimension than x. This means that h loses some dimensions compared to x, implying a reduction in data intelligence going from x to h.

f or g has low capacity (e.g., linear g). This means that f or g is using a simplistic function and not a more complex function for less overfitted or less accurate transformation.

Forces latent layer h to learn the most salient features of the input.

Learning is achieved simply by minimizing the loss function: L(x,g(f(x)))

This loss function represents the reconstruction error and may be learned via mean squared error (MSE).

If the encoder and decoders are allowed too much capacity, then autoencoder might just learn to copy the input to output without deriving useful properties.

Applications include dimensionality reduction. It is a known fact that the lower dimensional data performs better in classification tasks, and consumes less memory and runtime.

In the next section, let us discuss the overcomplete autoencoders.

Overcomplete Autoencoders

In this autoencoder, h has a higher dimension than x.

Normally, this may cause it to trivially learn to copy input to output. This is solved by regularization: L(x, g(h)) + Ω(h) , where Ω(h) is the regularizer.

Quick Recap: Regularization is a way to introduce some kind of small error in the neural network to prevent overfit to input.

In the next section, let us focus on the types of overcomplete autoencoders.

Types of Overcomplete Autoencoders

There are three types of overcomplete autoencoders as shown below:

  • Denoising Autoencoders

  • Contractive Autoencoders

  • Sparse Autoencoders

Sparse Autoencoders

Help learn latent or hidden aspects of the data.

They are typically used to learn features for another task, such as Classification.

A type of sparse autoencoder called variational autoencoder can be used for generative modeling e.g., produce new art or new text.

Denoising Autoencoders

This kind of autoencoder receives a corrupted data point as input and is trained to produce the original uncorrupted data point as output.

Useful for noise removal in data, e.g., in images or language text.

Willing to take up a course in Deep Learning? Check out our Deep Learning Course Preview now!

Contractive Autoencoders

Adds a certain sparsity penalty (regularizer) to the loss function, which has the effect of changing the neighborhood of the input data to a smaller neighborhood in the output.

This results in the output becoming invariant to slight changes in the input.

Such functionality is useful for dimensionality reduction, generalizing the output, information retrieval eg: search queries etc.

In the next section, let us explore the reinforcement learning.

Reinforcement Learning

Reinforcement Learning teaches desirable behavior by assigning rewards for the right set of actions. It trains a model to make decisions about future actions. Eg: Robotics, gaming or driverless cars.

Working Principle

The neural network is trained by awarding a positive incentive for achieving the desired behavior. The agent, in this case, learns to do actions which maximize the cumulative rewards earned over a set of such action sequences.

The steps followed are:

  • Agent observes the environment

  • Takes actions such that certain long-term rewards are maximized

  • Adjusts actions based on rewards

Training a dog to fetch a ball is an example of this. You cannot control the behavior of dog but you can reward him with food every time he fetches the ball. Over time, the dog masters what behavior will get him rewards.

It is used extensively in gaming applications as well as driverless cars.

The agent learns the strategy, or policy (choice of actions), which maximizes its rewards over time.

Simple reward feedback is provided to the agent to learn its behavior. This is called a reinforcement signal.

The agent interacts with the environment.

S = set of states the environment is in

A = set of actions that the agent can take

Each time the agent performs action “a” in the state “s”, it receives a real-valued reward “r”.

The agent’s task is to learn a control policy π: S => A, that maximizes the expected sum of these rewards, with future rewards discounted exponentially by their delay.

The immediate rewards have a higher weight compared to the future rewards.


Typical RL environments like gaming have an advantage that a huge amount of data can be generated easily unlike in real-world cases of supervised learning, where a lot of data is needed from the real world.

Google used RL systems to achieve 40% reduction in the amount for electricity for cooling in

their data centers.

In the next section, let us learn the generative adversarial networks.

Generative Adversarial Networks (GANs)

GANs are generative models used to learn new generation capabilities. They are based on ‘Game Theory Scenario’ in which the generator network must compete against an adversary.

The idea of GANs is to produce output that contains new data similar to training data. They do so by learning the natural features of the training dataset. A gradual learning enables this network to produce an output which looks similar to training data.

GANs represent unsupervised learning as there does not exist an explicit desired output. It deals with unlabelled data.

Example: Millions of real images are taken as training data in a GAN to produce images similar to training data, in other words, realistic images


The advantages of using GANs are:

  • The neural network is learning how the real world looks like

  • Images produced by GAN could be sharper than the training images

  • Used to produce samples of photorealistic images for the purposes of visualizing new interior/industrial design, shoes, bags, and clothing items or items for computer games' scenes.

Let us discuss the working of GANs in the next section.

How Do Generative Adversarial Networks(GANs) Work

The working of GANs can be explained in five steps as follows:

Step 1

In addition to a generative layer in the network (G), there is an additional neural network, a discriminator network D that tries to classify if an input image is real or generated.

For example, around 200 generated images and 200 real images are fed into the discriminator and trained to classify them as “real images” or “generated images”.

The discriminator network is usually a standard convolutional neural network.

Step 2

Backpropagation is done both through discriminator and generator to find how the generator parameters can be changed to make its 200 images slight more confusing for the discriminator.

Step 3

In effect, the generator G is trying to fool the discriminator D by generating fake images which are closer to real images, and discriminator is always trying to distinguish them.

Step 4

The training procedure for G is to maximize the probability of D making a mistake.

Step 5

In the end, the generator will output images that are indistinguishable from real images for the discriminator.

Wish to have in-depth knowledge of Deep Learning? Consider enrolling in our Deep Learning Course now!


Let us summarize what we have learned in this lesson:

  • Deep Learning includes other advanced techniques like Autoencoders, Reinforcement Learning, and Generative Adversarial Networks.

  • The generator produces samples which are close to real samples, and the discriminator tries to distinguish real samples from generated samples.

  • An Autoencoder represents an identity function where the input is copied to the output, but in such a manner that the copy over is approximate and not precise. This makes the model learn the most important features of the input.

  • Eventually, the generator learns to produce samples which look real to the discriminator. This helps in generating new art or new text.

  • Reinforcement Learning teaches agents what kind of actions are more desirable. This is achieved by incentivizing the agents with positive rewards for performing those actions.


This concludes the lesson on “Other Forms of Deep Learning.” You can also consider taking up our course Deep Learning (with TensorFlow) Certification Course.

Find our Deep Learning with TensorFlow Online Classroom training classes in top cities:

Name Date Place
Deep Learning with TensorFlow 20 Jul -18 Aug 2019, Weekend batch Your City View Details
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.

Request more information

For individuals
For business
Phone Number*
Your Message (Optional)
We are looking into your query.
Our consultants will get in touch with you soon.

A Simplilearn representative will get back to you in one business day.

First Name*
Last Name*
Phone Number*
Job Title*