I am using a neural network to output a 4x4 patch and 2 coordinate values x and y. So the output here I get is 100 x 1 x 4 x 4 for batch of 100 for my patches and 100 x 2 for coordinates. Now I have the images of shape 100 x 1 x 28 x 28 and I want to add these patches at their respective coordinates to these images. How can I do this?
I tried doing this:
image[:, 0, idx[:, 0]: idx[:, 0] + 4, idx[:, 1]: idx[:, 1] + 4] = patch
but it doesnt work