# U-net segmentation loss does not decrease

**URL:** <https://discuss.pytorch.org/t/u-net-segmentation-loss-does-not-decrease/68962>\
**Category:** Uncategorized\
**Created:** [February 7, 2020, 10:37am UTC](https://discuss.pytorch.org/t/u-net-segmentation-loss-does-not-decrease/68962 "2020-02-07T10:37:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Diauro](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/e68b1a/32.png) [@Diauro](https://discuss.pytorch.org/u/Diauro)\
**Post date:** [February 9, 2020, 3:18pm UTC](https://discuss.pytorch.org/t/u-net-segmentation-loss-does-not-decrease/68962/5 "2020-02-09T15:18:12Z")

</div>

Currently I’m using as you suggested **nn.BCEWithLogitsLoss** and tried the model on a small data set of 15 images (should be small enough). But now the loss even if it goes down very fast it saturates and around 0.086 and 0.084.  
So I guess this indicates that there is a more serious problem on the model or on the data?

I’ve tried out of curiosity this example using ResNetUnet from this example [ResNetUnet](https://github.com/usuyama/pytorch-unet) and again the loss saturates for a small training data around 0.083.

I’ve also normalized my data with

```auto
transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])

```

Any suggestion is more than welcome. Thanks again !

---

_[View the full topic](https://discuss.pytorch.org/t/u-net-segmentation-loss-does-not-decrease/68962)._
