Modify the pool kernel to support non-square image

Add image X image Y and output X output Y to kernel