Hi,
Automatic differentiation can only do vector jacobian product. So the grad_outputs that you give are multiplied by the jacobian. Since you give a vector full on ones, it sums up the gradients.
The two main ways to be able to get a gradient for each of your loss are:

Do one backward for each of them and store the gradients.
Expand your weights to the right batch size before the forward so that the regular backward will give you what you want.