I would like to create my own custom Loss function as a weighted combination of 3 Loss Function, something similar to:
criterion = torch.nn.CrossEntropyLoss(out1, lbl1) + \
torch.nn.CrossEntropyLoss(out2, lbl2) + \
torch.nn.CrossEntropyLoss(out3, lbl3)
I am doing it to address a multi-class multi-label classification problem. Does it make sense? How to implement correctly such Loss Function in Pytorch?
Thanks