-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change instantiation of prediction heads to make them configurable vi…
…a Hydra
- Loading branch information
1 parent
1520968
commit 8841a46
Showing
4 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ defaults: | |
- /task/img_tokenizer/model: linear-embedding | ||
- /task/model/encoder: ??? | ||
- /task/model/contrastive_head: mlp | ||
- /task/model/prediction_head: ft-prediction | ||
- /task/model/[email protected]_head: unimodal-logits | ||
- override /task/model: null # Set this to null because we specify multiple submodels instead of a singleton model | ||
- override /task/optim: adamw | ||
- override /data: cardinal | ||
|
2 changes: 2 additions & 0 deletions
2
didactic/config/task/model/prediction_head/ft-prediction.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
_target_: didactic.models.layers.FTPredictionHead | ||
in_features: ${task.embed_dim} |
5 changes: 5 additions & 0 deletions
5
didactic/config/task/model/prediction_head/unimodal-logits.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_target_: didactic.models.layers.UnimodalLogitsHead | ||
in_features: ${task.embed_dim} | ||
backbone_distribution: binomial | ||
tau: 1 | ||
tau_mode: learn_fn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters