# Why sum of parameter of model increase after each iteration during train the model?

**URL:** <https://discuss.pytorch.org/t/why-sum-of-parameter-of-model-increase-after-each-iteration-during-train-the-model/34788>\
**Category:** Uncategorized\
**Created:** [January 16, 2019, 9:57am UTC](https://discuss.pytorch.org/t/why-sum-of-parameter-of-model-increase-after-each-iteration-during-train-the-model/34788 "2019-01-16T09:57:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![alex.veuthey](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alex.veuthey/32/12176_2.png) [@alex.veuthey](https://discuss.pytorch.org/u/alex.veuthey)\
**Post date:** [January 16, 2019, 10:19am UTC](https://discuss.pytorch.org/t/why-sum-of-parameter-of-model-increase-after-each-iteration-during-train-the-model/34788/4 "2019-01-16T10:19:22Z")

</div>

Right, thanks for updating the question!

I think `.sum()` will add the parameters themselves, not the number of parameters.

[This topic](https://discuss.pytorch.org/t/how-do-i-check-the-number-of-parameters-of-a-model/4325/9) seems to have a clean solution for counting parameters.

---

_[View the full topic](https://discuss.pytorch.org/t/why-sum-of-parameter-of-model-increase-after-each-iteration-during-train-the-model/34788)._
