adaptive_avg_pool[23]d: check output_size.size() (#42831)
Summary:
Return an error if output_size is unexpected
Fixes https://github.com/pytorch/pytorch/issues/42578
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42831
Reviewed By: ezyang
Differential Revision: D23039295
Pulled By: malfet
fbshipit-source-id: d14a5e6dccdf785756635caee2c87151c9634872