multi-task-learning-example icon indicating copy to clipboard operation
multi-task-learning-example copied to clipboard

Any way to incorporate these methods in other tasks easily?

Open Jacobew opened this issue 6 years ago • 7 comments

Hi, thanks for your excellent job! I wonder is there any way to easily incorporate this method into other multi-tasks learning pipeline? I'm still trying to understanding the formulas and have no idea where I can obtain a noise scalar for each task. Looking forward to your reply :)

Jacobew avatar Sep 22 '19 09:09 Jacobew

@Jacobew Hi, I have the same problem did you figure out how to solve it ?

tamaraalshekhli avatar Jul 01 '20 08:07 tamaraalshekhli

Hi @Jacobew and @tamaraalshekhli , the task noise is an additional trainable parameter, although not an additional output of your network. What makes it the noise is the computation of the loss detailed in the paper and implemented on this github.

mikael10j avatar Jul 01 '20 08:07 mikael10j

@mikael10j , thank you for your reply, I found difficulties to make this implementation works with my pipeline, did you managed to make it works for you? sorry for my basic question but Im kind of new on the deep learning and im facing a lot of difficulties to make my MT network working.

tamaraalshekhli avatar Jul 01 '20 08:07 tamaraalshekhli

@tamaraalshekhli , if you use TF, it should be straightforward as every thing is described in Y. Gal's notebook.

mikael10j avatar Jul 01 '20 08:07 mikael10j

@mikael10j thank you for your reply, im using keras and TF as abackend, please correct me if im wrong, according to the cod i need to define two models one predicting model and the other one is suppose to be similar but this one suppose to be trained, and implementing the loss as a layer at the out put layer of the model?

tamaraalshekhli avatar Jul 02 '20 05:07 tamaraalshekhli

@tamaraalshekhli I'm not familiar with Keras (I use PyTorch), but if I understand correctly, get_prediction_model defines the model that learns to reconstruct the data and get_trainable_model combines the output of the model and the custom multi loss that learns the logvars. Imo you don't need to follow the same strategy, the important part to understand is the CustomMultiLossLayer. Again I'm not a specialist of Keras.

mikael10j avatar Jul 02 '20 07:07 mikael10j

@mikael10j thank you very much for your help, have you tried to train you MT model with different loss ? when i used for example binary cross entropy ( binary segmentation task) the model gave me good predictions for one task and a very bad predictions for the other one even when i tried different values for the weight loss

tamaraalshekhli avatar Jul 02 '20 07:07 tamaraalshekhli