# Trainer API showing loss = 0 after first log

**URL:** <https://discuss.huggingface.co/t/trainer-api-showing-loss-0-after-first-log/90575>\
**Category:** 🤗Transformers\
**Created:** [June 6, 2024, 12:15am UTC](https://discuss.huggingface.co/t/trainer-api-showing-loss-0-after-first-log/90575 "2024-06-06T00:15:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![not-lain](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/not-lain/32/59092_2.png) [@not-lain](https://discuss.huggingface.co/u/not-lain)\
**Post date:** [June 6, 2024, 12:15am UTC](https://discuss.huggingface.co/t/trainer-api-showing-loss-0-after-first-log/90575/1 "2024-06-06T00:15:05Z")

</div>

I am trying to make a custom AI model compatible with the trainer API and it seems that the loss is acting in an expected behaviour, there is no error or anything, just this one :

 ![logs](https://us1.discourse-cdn.com/hellohellohello/original/3X/6/d/6d23953d51d47c8991fe926f8d297c8159f892b5.png)

Code is pretty long to paste here so I uploaded a copy here :

> **[Google Colab](https://colab.research.google.com/drive/1_IenbmaMylGDkGMKeF03XR41S2OP3spn?usp=sharing)**

If any ideas why this is happeninig ?
