Thanks for the reply @ptrblck,  I am already on pytorch ‘1.7.0’.
I have further investigated this behavior and I suspect that it has to do with the loss’ grad_fn, because:
MaskRCNN returns the following object during training
{'loss_classifier': tensor(1.2836, device='cuda:0', grad_fn=<NllLossBackward>), 'loss_box_reg': tensor(0.0359, device='cuda:0', grad_fn=<DivBackward0>), 'loss_mask': tensor(1123.8214, device='cuda:0',
       grad_fn=<BinaryCrossEntropyWithLogitsBackward>), 'loss_objectness': tensor(0.8418, device='cuda:0', grad_fn=<BinaryCrossEntropyWithLogitsBackward>), 'loss_rpn_box_reg': tensor(0.0594, device='cuda:0', grad_fn=<DivBackward0>)}

After, stacking one gets
tensor([1.2836e+00, 3.5866e-02, 1.1238e+03, 8.4183e-01, 5.9387e-02],
       device='cuda:0', grad_fn=<StackBackward>)

Then, cleansing yields
 tensor([1.2836e+00, 3.5866e-02, 1.1238e+03, 8.4183e-01, 5.9387e-02],
       device='cuda:0', grad_fn=<IndexPutBackward>)

Clamping
tensor([ 1.2836,  0.0359, 10.0000,  0.8418,  0.0594], device='cuda:0',
       grad_fn=<ClampBackward>)

At last, after reduction, on gets
tensor(12.2206, device='cuda:0', grad_fn=<SumBackward0>)

I have read some “theory” here 1, but it’s not clear yet how to operationally make it work.
In short, I guess the question is how to reduce the losses so that I get a loss that can backward-propagate.
Note: if I choose any loss alone, say loss = loss_dict[“loss_classifier”] the training_step would run.