@apaszke
Is it possible to add losses of multiple types provided by torch.nn?
For eg. I have a network with two outputs and corresponding losses - crossentropy2d and crossentropy. I tried the following but it throws an error about incompatible types. Is there a way around?
b = cross_entropy2d(output_x, x_labels)
a = nn.CrossEntropyLoss(output_y, y_labels)
loss = a + b

Additional question - Is it possible to weigh the losses ie. total_loss = a + alpha * b ?