# What is the difference of .flatten() and .view(-1) in PyTorch?

**URL:** <https://discuss.pytorch.org/t/what-is-the-difference-of-flatten-and-view-1-in-pytorch/51790>\
**Category:** Uncategorized\
**Created:** [July 27, 2019, 4:43pm UTC](https://discuss.pytorch.org/t/what-is-the-difference-of-flatten-and-view-1-in-pytorch/51790 "2019-07-27T16:43:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ipid](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ipid/32/14495_2.png) [@ipid](https://discuss.pytorch.org/u/ipid)\
**Post date:** [July 28, 2019, 7:52am UTC](https://discuss.pytorch.org/t/what-is-the-difference-of-flatten-and-view-1-in-pytorch/51790/4 "2019-07-28T07:52:45Z")

</div>

Well I read those descriptions on the docs but they didn’t answer my questions.

---

_[View the full topic](https://discuss.pytorch.org/t/what-is-the-difference-of-flatten-and-view-1-in-pytorch/51790)._
