hello, sorry my bad, I update the location, they would be patches, for example, if I have an input image,
[XYX
 YXY
 XYX] -> shape [3, 3]

then I would extract
[X] -> shape [1x1] -> location [0, 0], [0, 2] ...
[Y] -> shape [1x1] -> location [0, 1], [1, 1] ...
[XY
 YX] -> shape [2x2] -> location [0, 0], [1, 1]
...

but this extraction of patches along with the location appear to be a memory intensive task, so I am stuck in the first step itself, all of the further steps only possible after embedding all the patches.