DLT Unit-2
DLT Unit-2
Introducing Deep Learning: Biological and Machine Vision, Human and Machine
Language, Artificial Neural Networks, Training Deep Networks, Improving Deep Networks.
autonomous systems, healthcare, and other fields. The challenges of bridging the gap between computer
vision and human vision will continue to inspire research and innovation.
The given figure illustrates the typical diagram of Biological Neural Network. The typical Artificial
Neural Network looks something like the given figure.
Dendrites from Biological Neural Network represent inputs in Artificial Neural Networks, cell nucleus
represents Nodes, synapse represents Weights, and Axon represents Output.
Relationship between Biological neural network and artificial neural network:
Axon Output
An Artificial Neural Network in the field of Artificial intelligence where it attempts to mimic the network
of neurons makes up a human brain so that computers will have an option to understand things and make
decisions in a human-like manner. The artificial neural network is designed by programming computers to
behave simply like interconnected brain cells.
There are around 1000 billion neurons in the human brain. Each neuron has an association point somewhere
in the range of 1,000 and 100,000. In the human brain, data is stored in such a manner as to be distributed,
and we can extract more than one piece of this data, when necessary, from our memory parallelly. We can
say that the human brain is made up of incredibly amazing parallel processors.
We can understand the artificial neural network with an example, consider an example of a digital logic
gate that takes an input and gives an output. "OR" gate, which takes two inputs. If one or both the inputs
are "On," then we get "On" in output. If both the inputs are "Off," then we get "Off" in output. Here the
output depends upon input. Our brain does not perform the same task. The outputs to inputs relationship
keep changing because of the neurons in our brain, which are "learning."
The architecture of an artificial neural network:
To understand the concept of the architecture of an artificial neural network, we have to understand what a
neural network consists of. In order to define a neural network that consists of a large number of artificial
neurons, which are termed units arranged in a sequence of layers. Lets us look at various types of layers
available in an artificial neural network.
Artificial Neural Network primarily consists of three layers:
Input Layer: As the name suggests, it accepts inputs in several different formats provided by the
programmer.
Hidden Layer: The hidden layer presents in-between input and output layers. It performs all the
calculations to find hidden features and patterns.
Output Layer: The input goes through a series of transformations using the hidden layer, which finally
results in output that is conveyed using this layer.
The artificial neural network takes input and computes the weighted sum of the inputs and includes a bias.
This computation is represented in the form of a transfer function.
It determines weighted total is passed as an input to an activation function to produce the output. Activation
functions choose whether a node should fire or not. Only those who are fired make it to the output layer.
There are distinctive activation functions available that can be applied upon the sort of task we are
performing.
Neural networks are widely used in supervised learning and reinforcement learning problems. These
networks are based on a set of layers connected to each other.
In deep learning, the number of hidden layers, mostly non-linear, can be large; say about 1000 layers.
DL models produce much better results than normal ML networks.
We mostly use the gradient descent method for optimizing the network and minimising the loss function.
We can use the Imagenet, a repository of millions of digital images to classify a dataset into categories like
cats and dogs. DL nets are increasingly used for dynamic images apart from static ones and for time series
and text analysis.
Training the data sets forms an important part of Deep Learning models. In addition, Backpropagation is
the main algorithm in training DL models.
DL deals with training large neural networks with complex input output transformations.
One example of DL is the mapping of a photo to the name of the person(s) in photo as they do on social
networks and describing a picture with a phrase is another recent application of DL.
Neural networks are functions that have inputs like x1,x2,x3…that are transformed to outputs like z1,z2,z3
and so on in two (shallow networks) or several intermediate operations also called layers (deep networks).
The weights and biases change from layer to layer. ‘w’ and ‘v’ are the weights or synapses of layers of the
neural networks.
The best use case of deep learning is the supervised learning problem.Here,we have large set of data inputs
with a desired set of outputs.
The process of improving the accuracy of neural network is called training. The output from a forward prop
net is compared to that value which is known to be correct.
The cost function or the loss function is the difference between the generated output and the actual output.
The point of training is to make the cost of training as small as possible across millions of training examples.
To do this, the network tweaks the weights and biases until the prediction matches the correct output.
Once trained well, a neural net has the potential to make an accurate prediction every time.
When the pattern gets complex and you want your computer to recognise them, you have to go for neural
networks. In such complex pattern scenarios, neural network outperformsall other competing algorithms.
There are now GPUs that can train them faster than ever before. Deep neural networks are already
revolutionizing the field of AI
Computers have proved to be good at performing repetitive calculations and following detailed instructions
but have been not so good at recognising complex patterns.
If there is the problem of recognition of simple patterns, a support vector machine (svm) or a logistic
regression classifier can do the job well, but as the complexity of patternincreases, there is no way but to
go for deep neural networks.
Therefore, for complex patterns like a human face, shallow neural networks fail and have no alternative
but to go for deep neural networks with more layers. The deep nets are able to do their job by breaking
down the complex patterns into simpler ones. For example, human face; adeep net would use edges to
detect parts like lips, nose, eyes, ears and so on and then re-combine these together to form a human face
The accuracy of correct prediction has become so accurate that recently at a Google Pattern Recognition
Challenge, a deep net beat a human.
This idea of a web of layered perceptrons has been around for some time; in this area, deep nets mimic the
human brain. But one downside to this is that they take long time to train, a hardware constraint
However recent high performance GPUs have been able to train such deep nets under a week; while fast
CPUs could have taken weeks or perhaps months to do the same.
• For text processing, sentiment analysis, parsing and name entity recognition, we use a recurrent
net or recursive neural tensor network or RNTN;
• For any language model that operates at character level, we use the recurrent net.
• For image recognition, we use deep belief network DBN or convolutional network.
• For object recognition, we use a RNTN or a convolutional network.
• For speech recognition, we use recurrent net.
In general, deep belief networks and multilayer perceptrons with rectified linear units or RELU are both
good choices for classification.
For time series analysis, it is always recommended to use recurrent net.
Neural nets have been around for more than 50 years; but only now they have risen into prominence. The
reason is that they are hard to train; when we try to train them with a method called back propagation, we
run into a problem called vanishing or exploding gradients.When that happens, training takes a longer time
and accuracy takes a back-seat. When training a data set, we are constantly calculating the cost function,
which is the difference between predicted output and the actual output from a set of labelled training data.
The cost function is then minimized by adjusting the weights and biases values until the lowest value is
obtained. The training process uses a gradient, which is the rate at which the cost will change with respect
to change in weight or bias values.
Regularization Techniques: As mentioned earlier, L1/L2 regularization, dropout, and batch normalization
can improve model generalization and reduce overfitting.
Advanced Architectures: Staying updated with the latest advancements in neural network architectures
can lead to significant improvements. For example, using architectures like ResNet, Inception, or
Transformers has shown great success in various tasks.
Custom Loss Functions: Designing task-specific loss functions that capture the unique characteristics of
the problem can enhance the model's performance.
Adversarial Training: Incorporating adversarial training to improve the model's robustness against
adversarial examples can be beneficial, especially in security-critical applications.
Remember that deep learning is an iterative process, and experimentation is essential to find the best
approach for a particular task. Monitoring the model's performance during training and adjusting techniques
accordingly is crucial for achieving the best results.