feat: adding stochastic positional embeddings - #1963
Conversation
|
/review |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1963 +/- ##
==========================================
- Coverage 86.36% 86.33% -0.04%
==========================================
Files 172 172
Lines 7358 7371 +13
==========================================
+ Hits 6355 6364 +9
- Misses 1003 1007 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@gabrielfruet The failing check seems to be regarding test coverage for ijepa.py for from_vit_encoder, should I add tests for this? And is there anything else I need to modify? |
liopeer
left a comment
There was a problem hiding this comment.
One last thing to address, otherwise looking good!
|
Hi @liopeer, a quick reminder for this PR. I have finished resolving the previous comments. When you have a chance, could you please take another look and let me know if any further changes are needed? Thanks! |
liopeer
left a comment
There was a problem hiding this comment.
It looks mostly correct now, sorry that it took a long time to review. One thing that we need to address though: Adding noise should only happen if the module is in training mode!
|
I also noticed that |
|
I think it's fine to leave it as it is, no need to cover this imo. |
Part of #1900
Summary
add_stochastic_positional_noiseas a utility function tolightly/models/utils.py.*
lightly/models/modules/ijepa.pyand*
lightly/models/modules/ijepa_timm.pytests/utils/test_stochastic_positional_embedding.pyto test the behaviour of the StoP function while disabled and enabled.Additional details:
lightly/models/modulesdoes not provide functionality to modify the masks directly, these are modified while creating the MAE class (examples/pytorch/mae.py). These examples can be modified to evaluate StoP.