Fix expansion of stride argument in max_pool2d (#23954)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/23954
There is only one substantive change: when stride.size() == 1,
we expand it to size 2. However, I also took the opportunity
to give a better error message.
Testing here is bare minimum, because I'm in a hurry. Just make
sure C++ API with all size 1 inputs works.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Differential Revision: D16695163
Pulled By: ezyang
fbshipit-source-id: 31674bf97db67e60e4232514c88a72be712bd9ae