Hotfix to gaussian pyramid

- The previous code was producing masks with incorrect shape, this hotfix solves the problem.