If you put your dropout_1 output into the 4 Linear layers (probably with 4 outputs, not 36) you can then calculate the losses individually and add them up to form a total loss.
Using that for gradient descent will do the right thing.
Best regards
Thomas