Multi target regression combined with multilabel classification

Hi, I’ve got a project where I want to map images to multiple features. The features are both continuous values, binary values and mutli-label values.

I understand that you can combine multiple targets for regression in the last linear layer and than use an appropriate loss function (MSE). However if I combine this for the other features (binary and multi-label) I would need to use sigmoid and softmax? How would you combine such a thing and which loss function would you use?

Or should I train 3 models so I can use the right loss function per model?

keep the output of your network to be coming from the Linear layer. Then i you want binary / multi-label, use the functions: BCEWithLogitsLoss or CrossEntropyLoss which both compute the logits internal to their formulation

1 Like