0% found this document useful (0 votes)
2 views4 pages

Module 2

Module 2 covers the basic technical foundations of neural networks, focusing on their structure and training methods. It explains how neural networks classify images, the process of making inputs machine-readable, and various machine learning approaches such as supervised, unsupervised, and reinforcement learning. Additionally, it outlines the steps required to train a machine learning model, including model initialization, forward pass, loss computation, backpropagation, and repeating the process through multiple epochs.

Uploaded by

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

Module 2

Module 2 covers the basic technical foundations of neural networks, focusing on their structure and training methods. It explains how neural networks classify images, the process of making inputs machine-readable, and various machine learning approaches such as supervised, unsupervised, and reinforcement learning. Additionally, it outlines the steps required to train a machine learning model, including model initialization, forward pass, loss computation, backpropagation, and repeating the process through multiple epochs.

Uploaded by

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

Module 2: Basic technical foundations

Topic 1: Structure of a Neural Network


Eg: Image classification means that we want the computer to recognise handwritten
numbers from pictures and put these pictures into the right group, hence, classifying
them. These images of handwritten numbers are called digits.
 Understanding the task: Neural network as a math problem like x + y = z. In
our example, x is the picture of a handwritten number that we show the
computer. We call this the input. The z is the answer we want, it is the digit the
neural network thinks the picture shows, so the output. The y is the part in the
middle.
 Making our Input Machine-Readable: turn the picture into numbers => use
the pixel values for this (A pixel is the smallest part of a digital picture). Each
number shows how dark or light a tiny part of our image is. => take all the
pixel values and put them in a long list – this is called a vector.
 Looking at the Structure of a Neural Network:
 Each number in the input layer is then passed to the hidden layers,
where the real “thinking” happens.
 In the hidden layers, there are many neurons connected by weights.
 Each neuron does a small calculation, deciding which parts of the image
seem important. These small decisions are passed from one layer to the
next, and together they help the network figure out what number is in
the picture.
 Finally, in the output layer, the network gives its best prediction, maybe
it thinks the number is a 3 or an 8.
 We then check if this matches the true label and give feedback to help
the network improve for next time.
Topic 2: Training a Neural Network
a. Different Approaches to Machine Learning
 Supervised learning: the model is trained using labeled data, where each
example has a known answer.
 Self-supervised learning is a special kind of supervised learning where the
computer creates its own labels from the data. For example, it might learn to
predict the missing part of a sentence or an image, helping it understand the
data better. This is an important approach because this is how large language
models (LLMs) like ChatGPT are trained. You might have heard that these
LLMs are trained on massive amounts of data taken from the internet.
 Unsupervised learning: the model isn’t given any labels. Instead it looks at
the data and tries to find patterns or organise it into groups. A common
example of an application that has been trained with unsupervised learning is
customer segmentation in marketing. Customer segmentation means dividing
customers based on what they buy, how old they are and what other websites
they visit. For that, companies look at the data of their customers and use
models to find patterns. These patterns are used to group customers together
based on their behaviour and preferences to create marketing campaigns that
fit what they like.
 Semi-supervised learning is a mix of both approaches. The model is given a
small amount of data with labels and a large amount of unlabeled data. It then
uses the labeled part to learn and better understand the unlabeled data. This
approach is often used in medical image analysis, where a model is supposed
to detect things like tumors or abnormalities in X-rays. Because it takes a lot of
time and medical knowledge to label these images, this approach is the best
fit.
 Reinforcement learning is different from all the others. Instead of learning
from a dataset, the computer learns by interacting with an environment. It tries
actions, gets feedback in the form of rewards or penalties, and uses this to
figure out the best way to achieve its goal, like learning how to win a game or
control a robot.
*Steps are required to train a machine learning model:
1. Model Initialisation: choosing random numbers for our first weights => changing
and adjusting the weight => they become better during the training.

2. Training Data: is made up of two parts: examples (sometimes called data points)
and labels. The basic idea is that during the training process, we show the model
the different examples and the correct class-labels and after the training, we expect
that the model can identify these classes even on images that were not included in
the training data.
3. Forward Pass: the same few steps are repeated multiple times for each example-
label pair in the training data. The first of these steps is a so-called forward pass.
We take one example image and feed it to the network. As the image moves

through the layers of the network, the model performs some calculations.

4. Computing the Loss: The next step in the training process is to look at the
performance. At the end of the first forward pass, the model produced a prediction.
Computing the loss means calculating the difference between the prediction and
the label. We want to know how far off we are from the correct answer. The loss is
a single number and it is used for the next step of training the model.
5. Backpropagation: a key part in the training process. It is the principle behind
“learning” in “machine learning”. Backpropagation describes the rules with which
we change the weights so that the model makes bettepredictions. Backpropagation
is essentially changing the weights in a systematic way. Systematic means that we
change them a lot if the loss is high and we change them only a little if the loss is
low.

6. Repeat: repeat this process for each pair in the training set. We call each time we
put the entire training set through the model an epoch. Training for ten epochs
means that we feed the training data to the model ten times

You might also like