# Is the reported loss averaged over logging steps

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 17, 2022, 9:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034 "2022-05-17T09:41:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ojturner](https://avatars.discourse-cdn.com/v4/letter/o/ee7513/32.png) [@ojturner](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fojturner)%5C
**Post date:** [May 17, 2022, 9:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034%2F1 "2022-05-17T09:41:31Z")

</div>

Hopefully a quick question!  
If I set logging\_steps=500 say in the TrainingArguments I get a log line with the ‘loss’, ‘learning\_rate’ and ‘epoch’ every 500 steps. I was wondering if the value for the loss is averaged over the 500 mini-batches, or if it is the value computed on the 500th batch?

Thank you!

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Post date:** [May 17, 2022, 11:42am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034%2F2 "2022-05-17T11:42:23Z")

</div>

It is the average since the beginning of training 🙂

---

<div class="post-metadata">

**Author:** ![ojturner](https://avatars.discourse-cdn.com/v4/letter/o/ee7513/32.png) [@ojturner](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fojturner)%5C
**Post date:** [May 17, 2022, 12:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034%2F3 "2022-05-17T12:04:25Z")

</div>

@sgugger thanks for the response - that makes sense.

One final question - does this average reset at the start of a new epoch? I’m seeing some jumps in the training loss (towards lower values) when a new epoch begins, when training with multiple epochs.

Thanks,  
Owen

---

<div class="post-metadata">

**Author:** ![Anshulky](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/anshulky/32/52539_2.png) [@Anshulky](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAnshulky)%5C
**Post date:** [August 25, 2025, 12:46pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-reported-loss-averaged-over-logging-steps%2F18034%2F4 "2025-08-25T12:46:39Z")

</div>

Hey! Did you get the answer to this
