This line is creating the empty tensors:
             for mod in module_losses:

modules_losses is is a list of modules that I add to my network, so that I can call them in the closure function:
loss_module = ModuleLoss(strength)
net.add_module(str(len(net)), loss_module)
module_losses.append(loss_module)

And apparently doing this creates another empty tensor:
loss +=mod.loss