Comments (2)
Hi @pcheng2
If I understand correctly the code you provided, you do not share parameters between the different tasks. For example, the second_model
is only used to predict the "m" task, and the third_model
is only used to predict the "n" task. In that case all parameters are tasks specific and so no MTL method is needed (you are basically doing single task learning in parallel for several tasks). If the tasks are related in any way, consider using a shared module (shared_model
) to map x
into features z
which will than be feed into the task specific modules (first_model
, second_model
, ...). In that case the parameters of the shared_model
are the shared_parameters
and all other params are the task_specific_parameters
.
Hope that helps
from nash-mtl.
Hi @AvivNavon,
Thank you so much for your replying! I'm sorry for the confusion about the question because I'm literally not quite familiar with MTL and based on your patient explanation, I'm more confident that I was misunderstanding the problem settings in MTL.
In my practical work, I will get different loss terms (approx. 8) from various modules(encoder-decoder and some feed-foward models), and backpropagate these losses to the modules' parameters. The problem is that I found these loss terms have different scales, thus the whole module may overfit in some direction where other losses are not converged yet. And my current solution is to manullay assign different weights on these terms.
Therefore, I was wrongly thought I might encounter an MTL problem, and try to find a method to automatically allocate the weights of these loss terms and their gradients. While in my case, each model is doing 'single task learning', there is no parameter/module sharing between them. I'll try your advice about using a shared module with different task-specific modules.
And for MTL tasks, I'm wondering that is it a necessary condition for the model to have various heads (usually at the last layer and with identical logits as input) regard to the task number?
Anyway, thank you so much for your kind response and suggestion, I'll try it out!
from nash-mtl.
Related Issues (14)
- Error about IMTLG method HOT 4
- About GradNorm HOT 2
- MT10 Training Code HOT 2
- Thank you for the great repository.If I don't know which parameter is shared and feed all parameters into method, can I get the right result? HOT 3
- Question about large weights HOT 6
- Logging HOT 4
- Questions about the property of convergence on theorem 5.4 and 5.5 HOT 1
- Mean Rank metric? HOT 1
- hi,i want to apply nash-mtl to my multi-task learning net. HOT 20
- about two warnings when training the model HOT 2
- About an errror during training process HOT 3
- Possible error in the implementation of CAGrad HOT 1
- is there code for torch.distributed? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nash-mtl.