# 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:** 6

<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 11, 2020, 10:10am UTC](https://discuss.pytorch.org/t/u-net-segmentation-loss-does-not-decrease/68962/6 "2020-02-11T10:10:43Z")

</div>

I was looking to this post ([UNet implementation](https://discuss.pytorch.org/t/unet-implementation/426/23) a bit old) where apparently in pytorch there were some issues to implement Unet. I could not find a real solution for the moment, Saed in one reply wrote only

"For the last set of convolutions, that is 128-\> 64 -\> 64 -\> 1, the activation function should not be used!  
The activation function causes the values to vanish!

I just removed the nn.ReLU() modules on top of these convolution layers and now everything works like a charm! "

---

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