# Is model.forward(x) the same as model.\_\_call\_\_(x)?

**URL:** <https://discuss.pytorch.org/t/is-model-forward-x-the-same-as-model-call-x/33460>\
**Category:** Uncategorized\
**Created:** [December 31, 2018, 5:58am UTC](https://discuss.pytorch.org/t/is-model-forward-x-the-same-as-model-call-x/33460 "2018-12-31T05:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [December 31, 2018, 12:24pm UTC](https://discuss.pytorch.org/t/is-model-forward-x-the-same-as-model-call-x/33460/3 "2018-12-31T12:24:58Z")

</div>

` __call__ ` is already defined in `nn.Module`, will register all hooks and call your `forward`. That’s also the reason to call the module directly (`output = model(data)`) instead of `model.forward(data)`.

---

_[View the full topic](https://discuss.pytorch.org/t/is-model-forward-x-the-same-as-model-call-x/33460)._
