# What is \`in-place operation\`?

**URL:** <https://discuss.pytorch.org/t/what-is-in-place-operation/16244>\
**Category:** Uncategorized\
**Created:** [April 11, 2018, 8:22am UTC](https://discuss.pytorch.org/t/what-is-in-place-operation/16244 "2018-04-11T08:22:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [April 11, 2018, 9:12am UTC](https://discuss.pytorch.org/t/what-is-in-place-operation/16244/2 "2018-04-11T09:12:20Z")

</div>

Hi,

An in-place operation is an operation that changes directly the content of a given Tensor without making a copy. Inplace operations in pytorch are always postfixed with a `_`, like `.add_()` or `.scatter_()`. Python operations like `+=` or `*=` are also inplace operations.

---

_[View the full topic](https://discuss.pytorch.org/t/what-is-in-place-operation/16244)._
