Copy activations from one parts to another part in tensor, but report error #35944
Labels
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
I want to copy the activations from one region in image (tensor, shape=(3, 800, 800)) to another region with same shape, and after dealing with parts of dataset, a bug will be reported.
ValueError: could not broadcast input array from shape (3,97,39) into shape (3,97,40)
Parts of my code is :
tmp = image[:, old_y0:old_y1+1, old_x0:old_x1+1]
image[:, old_y0+offset_y:old_y1+offset_y+1, old_x0+offset_x:old_x1+offset_x+1] = tmp
What I confused is that the location interval is exactly the same between two parts, but a bug was reported.
Version:
Pytorch 1.4
The text was updated successfully, but these errors were encountered: