Thinking an operation from the paper TensorMask: A Foundation for Dense Object Segmentation for days.
Given 4-d Tensor of shape (V, U, Y, X), how to implement
F(v, u, y, x) = F(v, u, y+v', x+u')
Where v' = v - int(v / 2), u' = u - int(u / 2)
and v, u, y, x
are normal indexes.
Thanks in advance.