Given a 2-D tensor Z of shape (h, w) whose dimensions are each divisible by k, compute the sum of each non-overlapping k×k block. Return the reduced tensor of shape (h/k, w/k).
Z
(h, w)
k
k×k
(h/k, w/k)
solve(...)