Open niedakh opened 4 months ago
Hi, great question
It is used here:
https://github.com/sileod/tasknet/blob/c9f43604c2c8bc7e33e3301f7c05b5dc8f77c0eb/src/tasknet/utils.py#L210
But actually, it would be cleaner to have it in adapt_model_to_task
I'll try to do it for the next release
The general idea is to have a shared encoder, one classifier per task (unless some task share all their labels), and task embedding per task The task embedding is randomly dropped at 10% rate to work without using it, but it allows the model to "see" the task it should do and it improves results, so it is best to add it alongsides the classifier. It's actually the core of the Adapter
The class Adapter expects Z in constructor:
but doesn't use it at all when adapting model to task?