# Any different between model(input) and model.forward(input)

**URL:** <https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690>\
**Category:** Uncategorized\
**Created:** [June 4, 2017, 5:36pm UTC](https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690 "2017-06-04T17:36:32Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dngros](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@dngros](https://discuss.pytorch.org/u/dngros)\
**Post date:** [January 4, 2019, 7:45am UTC](https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690/6 "2019-01-04T07:45:47Z")

</div>

Just avoiding using forward directly doesn’t really solve the issue that it breaks IDE support. One potential solution could be this [Solution to different forward for train and inference + IDE support for forward args](https://discuss.pytorch.org/t/solution-to-different-forward-for-train-and-inference-ide-support-for-forward-args/33756) . Here I just wrapped nn.Module to allow a forward method with both hooks and IDE support is retained.

---

_[View the full topic](https://discuss.pytorch.org/t/any-different-between-model-input-and-model-forward-input/3690)._
