Fixing the shape calculation for pool tests
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/28853
Test Plan: Imported from OSS
Differential Revision: D18212290
Pulled By: z-a-f
fbshipit-source-id: 44a41f3192c8b168a8a0fb68eb33b68400917c7a