# Model Parameter that is not updated

**URL:** <https://discuss.pytorch.org/t/model-parameter-that-is-not-updated/29505>\
**Category:** Uncategorized\
**Created:** [November 13, 2018, 3:12pm UTC](https://discuss.pytorch.org/t/model-parameter-that-is-not-updated/29505 "2018-11-13T15:12:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![InnovArul](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/innovarul/32/5282_2.png) [@InnovArul](https://discuss.pytorch.org/u/InnovArul)\
**Post date:** [November 13, 2018, 10:29pm UTC](https://discuss.pytorch.org/t/model-parameter-that-is-not-updated/29505/3 "2018-11-13T22:29:36Z")

</div>

You may need `register_buffer()`.

> [@Use and Abuse of .register\_buffer( )](https://discuss.pytorch.org/t/use-and-abuse-of-register-buffer/4128):
>
> Hi, I have some trouble understanding the use of register\_buffer(). I found just a little bit of explanation in the docs, mentioning “running\_mean” in BatchNorm. My questions are: When should I register a buffer? For what sort of Variables and for which not? Could someone provide me with a simple example and code snippet of using register\_buffer()? [3.] At the moment, I’m running some tests on an implementation of a custom gradient, which I subsequently modify. record the gradients before …

---

_[View the full topic](https://discuss.pytorch.org/t/model-parameter-that-is-not-updated/29505)._
