Yes, you won’t be able to call loss_avg1.backward() or loss_avg2.backward() since these objects are plain Python floats and are not attached to any computation graph (loss.item() detaches the value from the computation graph and returns a Python literal).