# TF1 COURSE 1 WEEK 2\_BEYOND\_HELLO\_WORLD: Loss represent average loss?

**URL:** <https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002>\
**Category:** Introduction to TF for Artificial Intelligence ...\
**Tags:** week-module-2\
**Created:** [November 20, 2022, 9:59pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002 "2022-11-20T21:59:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![WILLIAM\_AGYEKUM\_ASIE](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@WILLIAM\_AGYEKUM\_ASIE](https://community.deeplearning.ai/u/WILLIAM_AGYEKUM_ASIE)\
**Post date:** [November 20, 2022, 9:59pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/1 "2022-11-20T21:59:12Z")

</div>

![Screenshot_20221120_035349](https://global.discourse-cdn.com/dlai/original/3X/8/0/8086462998d0d7737a2af7a15876a6964f0a886d.png)  
Since the model is doing multi-label classification , does that mean the loss per each epoch as shown in the image above is the average loss obtained in classifying all the images ?

also what do the 1875 and 313 represent ?

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [November 21, 2022, 11:36am UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/2 "2022-11-21T11:36:31Z")

</div>

Yeah this is the average loss for the epoch for all images. I am wondering gif you are using early stopping so that a certain loss is achieved than the model training stops, and that is probably why you have 313 instead of 1875 as in the previous epochs.

---

<div class="post-metadata">

**Author:** ![WILLIAM\_AGYEKUM\_ASIE](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@WILLIAM\_AGYEKUM\_ASIE](https://community.deeplearning.ai/u/WILLIAM_AGYEKUM_ASIE)\
**Post date:** [November 21, 2022, 2:02pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/3 "2022-11-21T14:02:49Z")

</div>

Okay, thanks . but I am running 5 epochs with no early stopping.

---

<div class="post-metadata">

**Author:** ![gent.spah](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/gent.spah/32/136423_2.png) [@gent.spah](https://community.deeplearning.ai/u/gent.spah)\
**Post date:** [November 21, 2022, 2:48pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/4 "2022-11-21T14:48:25Z")

</div>

I see, I am puzzled too. Maybe its doing validation or somekind of testing for some subset of images…

---

<div class="post-metadata">

**Author:** ![WILLIAM\_AGYEKUM\_ASIE](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@WILLIAM\_AGYEKUM\_ASIE](https://community.deeplearning.ai/u/WILLIAM_AGYEKUM_ASIE)\
**Post date:** [November 21, 2022, 6:04pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/5 "2022-11-21T18:04:57Z")

</div>

Yeah , seen it. It is testing after training . Thanks !

---

<div class="post-metadata">

**Author:** ![nilosreesengupta](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nilosreesengupta/32/11457_2.png) [@nilosreesengupta](https://community.deeplearning.ai/u/nilosreesengupta)\
**Post date:** [November 21, 2022, 8:05pm UTC](https://community.deeplearning.ai/t/tf1-course-1-week-2-beyond-hello-world-loss-represent-average-loss/233002/6 "2022-11-21T20:05:47Z")

</div>

Hello @WILLIAM_AGYEKUM_ASIE ,

1. You need to take 10 epochs. It’s given in the hint :

> You must set your model to train for 10 epochs and the callback should fire before the 9th epoch for you to pass this assignment.

1. and **1875** is the number of steps per epoch.

With regards,  
Nilosree Sengupta
