#   and reshape them to (x_patches, y_patches, dim)