Given a 4-D tensor A of shape (a, b, c, d), return the sum over its last two dimensions, producing a 2-D tensor of shape (a, b).
A
(a, b, c, d)
(a, b)
solve(...)