• Home
  • About
  • Join Us
  • Contact
Bharat Ideology
  • Insight
  • Culture
  • Economics
  • Parenting
  • Science & Tech
Subscribe
No Result
View All Result
  • Insight
  • Culture
  • Economics
  • Parenting
  • Science & Tech
Subscribe
No Result
View All Result
Bharat Ideology
No Result
View All Result
Home Science & Tech

Why does the loss or accuracy fluctuate during the training?

by bharatideology
January 9, 2025
in Science & Tech
0
Why does the loss or accuracy fluctuate during the training?
Share on FacebookShare on Twitter

Introduction

It has been commonly observed that when we are training a Model especially CNN Model then the loss fluctuates a lot. In this article we will understand the reasons for this fluctuation and how can you minimize this fluctuation.

Reasons for Fluctuations in Loss During Training

There are several reasons that can cause fluctuations in training loss over epochs.

Related articles

India’s Digital Revolution: A Quantum Leap Towards a $5 Trillion Dream

Top 10 Generative AI Tools and Platforms Reshaping the Future

The main one though is the fact that almost all neural nets are trained with different forms of gradient decent variants such as SGD, Adam etc. which causes oscillations during descent.

If you use all the samples for each update, you should see loss decreasing and finally reaching a limit, but this will take lot of time and computational power. This is why batch_size parameter exists which determines how many samples you want to use for one update to the model parameters, but with this batch feature fluctuation in loss and accuracy comes along with it.

Very small batch_size

Second reason for fluctuation is when we use very small batch_size. So it’s like you are trusting every small portion of the data points.

Now let’s assume that within your data points, you have a mislabelled sample. This sample when combined with 2-3 even properly labelled samples, can result in an update which does not decrease the global loss, but increase the loss and move the descent away from a local minima.

Solution – When the batch_size is larger, such effects would be reduced. Along with other reasons, it’s good to have batch_size higher than some minimum. Having it too large would also make training go slow with increased memory requirements. Therefore, batch_size is treated as a hyper-parameter with optimal value.

Large network, small dataset

Another reason would If you are training a relatively large network with 100K+ parameters with a very small number of samples, says just 100 samples.

In other words, if you want to learn 100K parameters or find a good local minimum in a 100K-D space using only 100 samples, it would be very difficult and you would end up with lots of fluctuations in loss or accuracy rather than coming down on a good local minima.

Solution – We should use network with less parameters (i.e. light network) if we have small sample size or increase the sample size.

If you want to look at the code example of how you can train a model for object detection and image classification then you can go to Training a CNN model from scratch using custom dataset.

Tags: AccuracyCNNModel AccuracyModel TrainingTraining

bharatideology

Related Posts

India’s Digital Revolution: A Quantum Leap Towards a $5 Trillion Dream

India’s Digital Revolution: A Quantum Leap Towards a $5 Trillion Dream

by bharatideology
February 17, 2024
0

The year is 2024, and India stands at a crossroads. The ghosts of the "fragile five" label still linger in the collective memory, but a new...

Top 10 Generative AI Tools and Platforms Reshaping the Future

Top 10 Generative AI Tools and Platforms Reshaping the Future

by bharatideology
January 9, 2025
0

Generative AI, the technology that conjures new ideas and content from thin air, is taking the world by storm. From crafting captivating images to writing eloquent...

Decoding the Future: Gen AI’s Evolution in 2024 – Trends, Strategies, and Business Impact

Decoding the Future: Gen AI’s Evolution in 2024 – Trends, Strategies, and Business Impact

by bharatideology
January 9, 2025
0

Introduction The past year has witnessed an explosive eruption in the realm of Generative AI (Gen AI), propelling it from a nascent technology to a pivotal...

Will Gemini be the AI to Rule Them All? Exploring the Rise of Google’s Multimodal Colossus

Will Gemini be the AI to Rule Them All? Exploring the Rise of Google’s Multimodal Colossus

by bharatideology
January 9, 2025
0

The landscape of Large Language Models (LLMs) has witnessed a rapid evolution, with Google playing a pivotal role in pushing boundaries. Enter Gemini, Google's latest LLM,...

GenAI, LLMs, and Vector Databases: Revolutionizing Recommendation Systems in 2024

GenAI, LLMs, and Vector Databases: Revolutionizing Recommendation Systems in 2024

by bharatideology
January 9, 2025
0

Overview The world of recommendation systems is undergoing a paradigm shift, propelled by the convergence of Generative AI (GenAI) and Large Language Models (LLMs). These powerful...

CATEGORIES

  • Culture
  • Economics
  • Insight
  • Parenting
  • Science & Tech

RECOMMENDED

India’s Strategic Port Infrastructure: Driving Economic Growth and Connectivity
Insight

India’s Strategic Port Infrastructure: Driving Economic Growth and Connectivity

July 11, 2023
Breaking Barriers: India’s Journey towards Financial Inclusion for 46 Crore People
Economics

Breaking Barriers: India’s Journey towards Financial Inclusion for 46 Crore People

February 16, 2024

Twitter Handle

TAGS

Agnipath Ambedkar Panchteerth Artificial Intelligence Ayodhya Ayushman Bharat Backpropogation Bhagwan Birsa Munda Museum CNN CNN Architecture Co-win Computer Vision Consecration Deep Learning Digital India Digital Revolution FutureSkills PRIME GenAI Hornbill Festival Image Segmentation International Space Station LLM Make in India Namami Gange Narendra Modi Neural Network Object Detection OCR OpenCV PLI PM Modi PRASHAD Python Ramayana Ram Mandir Recurrent Neural Network RNN Sangai Festival Semiconductor Shri Ram Janambhoomi Temple Skill India Statue of Unity Swadesh Darshan Tensorflow Vaccine Maitri Women empowerement
Bharat Ideology

Do not be led by others,
awaken your own mind,
amass your own experience,
and decide for yourself your own path - Atharv Ved

© Copyright Bharat Ideology 2023

  • About
  • Disclaimer
  • Terms & Conditions
  • Contact
No Result
View All Result
  • About
  • Contact
  • Disclaimer
  • Home
  • Terms and Conditions of use

© Copyright Bharat Ideology 2023