Hi,
In general, you should never use .data. There is no reason for you to need it here, and it is very very likely to hide silent bugs.
In your example, if each loss is generated from a single param and is independent of the others, you can simply sum them up and do a single backward that will compute the right gradients.