Adapt CEBRA-Lens so that compatible with unified CEBRA#50
Adapt CEBRA-Lens so that compatible with unified CEBRA#50CeliaBenquet wants to merge 29 commits intomainfrom
Conversation
- build docs
|
@CeliaBenquet you'll have to rebase to main/fix conflicts as this was branched from git actions |
| rdm = pdist(layer_activation[self.idxs.flatten(), :], metric=self.metric) | ||
| rdm = pdist(layer_activation[self.idxs.flatten(), :], | ||
| metric=self.metric) | ||
| if self.bool_oracle: |
There was a problem hiding this comment.
@CeliaBenquet
Just a quick note: the parameter bool_oracle is currently commented out in the init method — it would be good to also comment it out (or remove it) consistently in the _compute_per_layer and plot functions.
There was a problem hiding this comment.
My idea was that we don't want to remove it entirely, just not have it in the init, and have it as a parameter in the plot_metric function.
I didn't test the PR thoroughly but the aim is that you build on it now as there are the key points to adapt to unified CEBRA, so if you see that this is not the behavior now, feel free to change it in your branch :)
|
@anandawolz, note that conflicts are resolved and the tests should pass now, but I didn't add new tests for unified CEBRA. Please do in your branch :) Note 2: the tests don't pass because the CEBRA version on pypi is not the latest one with unified CEBRA, you will have the same for future implementations you do. If that's too much of an issue we can update to a given commit on the requirement, but ideally you run the tests locally before committing now. Note 3: I fixed the issues with decoder for output_only, and updated the notebook, still issues with output_only=False and the rdm metric. |
…-fixes Partial fix activation hook batching, padding trim, and decoding dimensionality.
|
Reviewed – Unified CEBRA compatibility works well. Thanks! |
| self.dataset_label, | ||
| ) | ||
| }) | ||
| if i == 0 and not isinstance(model, |
There was a problem hiding this comment.
BUG: if model is UnifiedSolver, i == 0 falls into the else and uses keys[i-1] == keys[-1],
so the last layer gets decoded twice (layer 0 unintentionally duplicates the final activation)
I change it in PR #59
…ast layer & tests fix
…oding-and-plot Add binary decoding and correct axis name for plot, fix plot per layers
Not all work yet but I added some if statements for unified CEBRA.
What doesn't work
--> I discuss with @anandawolz and she might have solved this in #44?
@anandawolz have a look and you can improve on top of this by creating a branch from it ideally.