0% found this document useful (0 votes)
9 views10 pages

Neural Networks

The document explains the concepts of neurons and neural networks, highlighting their roles in both biological and artificial contexts. It describes the structure of neural networks, including input, hidden, and output layers, and outlines the processes of forward and back propagation during training. Additionally, it introduces PyTorch as an open-source library for building and training neural network models.

Uploaded by

Tanya Rastogi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Neural Networks

The document explains the concepts of neurons and neural networks, highlighting their roles in both biological and artificial contexts. It describes the structure of neural networks, including input, hidden, and output layers, and outlines the processes of forward and back propagation during training. Additionally, it introduces PyTorch as an open-source library for building and training neural network models.

Uploaded by

Tanya Rastogi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NEURAL NETWORKS

& PYTORCH
What is a
Neuron?
A neuron is a specialized nerve cell in the human
body that is responsible for receiving, processing,
and transmitting information through electrical
and chemical signals. Neurons are the
fundamental building blocks of the brain.
NEURAL NETWORKS
Neural networks forms the basis of deep learning
where the algorithms are inspired by the structure of
the human brain. A neural network is made up of
tiny units called neurons, just like the brain.
These neurons are arranged in layers:
[Link] layer – takes the data (like an image or
numbers).
[Link] layers – do the thinking by finding
patterns.
[Link] layer – gives the final answer (like “cat” or
“not cat”).
What is a neuron in terms
of Neural Networks?
A neuron in a neural network is a simple
unit that receives input, does a
calculation, and sends output. It's the
building block of deep learning models.

A neuron (sometimes called a node or unit) is a


mathematical function inspired by biological
neurons in your brain.
Just like a real brain neuron receives signals and
decides whether to act or not, an artificial neuron:
-Takes input(s)
-Applies weights and bias
-Passes the result through an activation function
-Outputs a number

09
Biological Neural network Vs
Artificial Neural Network

Biological Neural Network (BNN) 01 Artificial Neural Network (ANN)

- A natural network of neurons in the brain and nervous system. - A computer-based model inspired by the brain’s
-The basic unit is a biological neuron. -The basic unit is an artificial neuron or node.
-It uses electrochemical signals to transmit information. -It uses numerical values to process and transmit
data.

-Neurons are connected by synapses. -Neurons are connected by weighted links.


Learning occurs through experience and changes in synapses. -Learning occurs by adjusting weights using
algorithms

-It operates slowly in milliseconds. -It operates very fast in microseconds


Building a
Neural Network
A neural network that differentiates between a square,
circle and triangle. Neural networks are made up of layers
of neurons these neurons are the core processing units of
the network.
First, we have the input layer which receives the input the
output layer predicts our final output in between exists the
hidden layers which perform most of the computations
required by our network.
Considering image of a [Link] image is composed of 28
by 28 pixels which make up for 784 pixels.

03
Each pixel is fed as input to each neuron of the first
[Link] of one layer are connected to neurons
of the next layer through channels each of these
channels is assigned a numerical value known as
weight. The inputs are multiplied to the
corresponding weights and their sum is sent as input
to the neurons in the hidden layer each of these
neurons is associated with a numerical value called
the bias which is then added to the input [Link]
value is then passed through a threshold function
called the activation function
The result of the activation function determines if the particular neuron will get activated or not. An
activated neuron transmits data to the neurons of the next layer over the channels in this manner the
data is propagated through the network. This is called forward propagation. In the output layer, the
01 02
neuron with the highest value fires and determines the output. The values are basically a probability
for example here our neuron associated with square has the highest probability. Hence, that's the
output predicted by the neural network. But, just by a look at it we know our neural network has made
a wrong prediction, but how does the network figure this out?
Note that our network is yet to be trained. During this training
process along with the input, our network also has the output fed
to it.
The predicted output is compared against the actual output to
realize the error in prediction. The magnitude of the error
02
indicates how wrong we are and the sign suggests if our
predicted values are higher or lower than expected. The arrows
here give an indication of the direction and magnitude of change
to reduce the error this information is then transferred backward
through our network this is known as back propagation .Now
based on this information the weights are adjusted. This cycle of
03 04
forward propagation and back propagation is iteratively
performed with multiple inputs this process continues until our
weights are assigned such that the network can predict the
shapes correctly.
What is PyTorch?
PyTorch is an open-source deep learning library developed by Facebook’s AI Research Lab (FAIR). It is
used to build and train machine learning and neural network models.
Easy to Use
PyTorch has a simple and Pythonic interface, which makes it beginner-friendly and great for learning.
Supports Neural Networks
PyTorch makes it easy to build deep learning models like CNNs and RNNs.

Used to:
Build and train neural networks
Develop AI applications in computer vision, NLP, etc.

You might also like