Added a flatten module (#22245)
Summary:
https://github.com/pytorch/pytorch/issues/2118
I'm not sure I'm doing it correctly, so I'll add tests if we decide that it's roughly correct.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22245
Differential Revision: D16508957
Pulled By: Chillee
fbshipit-source-id: a8dc7af999ba698c921006889f71cb1bc5a59d50