Skip to main content
HT
HerbDev Technical Consulting
← Learning hub

Free guided course · ML 101

Training, loss and model settings

Explain how a training step changes a model.

Beginner · Lesson 3 of 6 · About 8 minutes · No account needed

  • ML 101
  • Practical examples
  • Self-paced learning

Your learning progress

0 of 6 checkpoints complete · Best score: 0 of 18

0 of 6

Enable Preferences in Cookie settings to save scores and progress on this browser. You can learn and score without accepting; unsaved progress ends when you leave the page.

Answer all three questions correctly to complete a checkpoint. Retry as often as you like; your best score counts. Scores stay on this browser and can be cleared. They do not transfer between devices.

Start the first lesson →

Learn · Try · Check

What you’ll learn

Explain how a training step changes a model.

Listen to this lesson

Local AI narration · Quiz answers are kept out of the audio.

Read the audio transcript

ML 101. Training, loss and model settings. Explain how a training step changes a model. Measure how far the prediction is from the target. A model makes a prediction from an input. A loss function turns the mismatch between prediction and target into a number that training can try to reduce. Different tasks use different losses. A lower training loss means the model fits the training objective better; it does not by itself establish better behavior on new inputs. Evaluation remains a separate step. Adjust learned values. Parameters are values fitted during training, such as weights. Gradient-based training uses information about how the loss changes to choose a direction for a parameter update. The learning rate controls the size of that update. It is a hyperparameter: a setting chosen outside the ordinary parameter-fitting step. The update below is a deliberately simplified scalar example, not a complete neural-network trainer. Make a small change you can interpret. If a weight is 2.0, the learning rate is 0.1 and the gradient is 3.0, the update gives 1.7. A learning rate that is too large can make optimization unstable; a very small one can make progress slow. Keep the data split and evaluation procedure fixed when comparing settings. Changing the model, dataset and metric together makes it difficult to tell which change helped. HerbDev example. HerbDev’s experiment overview starts from baselines, controlled optimization and validation. Follow that order: understand one measurable training change before comparing a long list of architectures. The process: Predict from an input. Then Compute a loss. Then Calculate an update. Then Check validation behavior. Try this. Use the update rule with weight 2.0, learning rate 0.1 and gradient 3.0. Then name what you would inspect beyond training loss. Pause the audio to try the exercise. A worked answer and checkpoint questions are available on the lesson page.

Measure how far the prediction is from the target

A model makes a prediction from an input. A loss function turns the mismatch between prediction and target into a number that training can try to reduce. Different tasks use different losses. A lower training loss means the model fits the training objective better; it does not by itself establish better behavior on new inputs. Evaluation remains a separate step.

Adjust learned values

Parameters are values fitted during training, such as weights. Gradient-based training uses information about how the loss changes to choose a direction for a parameter update. The learning rate controls the size of that update. It is a hyperparameter: a setting chosen outside the ordinary parameter-fitting step. The update below is a deliberately simplified scalar example, not a complete neural-network trainer.

Make a small change you can interpret

If a weight is 2.0, the learning rate is 0.1 and the gradient is 3.0, the update gives 1.7. A learning rate that is too large can make optimization unstable; a very small one can make progress slow. Keep the data split and evaluation procedure fixed when comparing settings. Changing the model, dataset and metric together makes it difficult to tell which change helped.

The process, step by step
  1. Predict from an input
  2. Compute a loss
  3. Calculate an update
  4. Check validation behavior
weight = 2.0
learning_rate = 0.1
gradient = 3.0

weight = weight - learning_rate * gradient
print(weight)  # 1.7

Try it yourself

Use the update rule with weight 2.0, learning rate 0.1 and gradient 3.0. Then name what you would inspect beyond training loss.

Compare with a worked answer

The updated weight is 2.0 − 0.1 × 3.0 = 1.7. Inspect validation performance and relevant error cases to see whether the change helps on examples not used for fitting.

Check your understanding

Choose one answer for each question, then check your score. Read the explanations and retry any question you missed.

1. Which value is normally learned during training?

2. What is 2.0 − 0.1 × 3.0?

3. Lower training loss alone proves better performance on new data.

Read the answer guide

1. A neural-network weight Weights are parameters. The learning rate is a setting controlling the fitting procedure.

2. 1.7 Multiply the learning rate and gradient to get 0.3, then subtract it from 2.0.

3. False A model can fit training data better while generalizing worse. Check independent validation behavior.

Was this explanation clear?

Help improve this lesson. With cookies accepted, HerbDev records one current rating per lesson for this browser. Server checks limit repeated submissions; accepted changes may also appear in site analytics. No written answer or account is needed.

You can also share a suggestion with HerbDev.

Review missed questions

Revisit questions missed on your latest checkpoint attempts. These short reviews help you practise; they do not change your best checkpoint scores. Return to the lesson checkpoint when you are ready.

Check a lesson’s answers to build your review list. Saved reviews are available after cookie acceptance.

Keep exploring: What next? · AI vocabulary · AI 101 · Learning hub

Manage browser learning data

“Remove my test data” clears all AI 101 and ML 101 scores, reviews, project checklists and rating selections, plus saved vocabulary and recent history in this browser. Test entries cannot be separated from other learning progress. Cookie preferences, security protections, submitted feedback, contact emails and past analytics are kept.