WalterSimoncini / fungivision

Library implementation of "No Train, all Gain: Self-Supervised Gradients Improve Deep Frozen Representations"
https://fungi.ashita.nl
MIT License
19 stars 0 forks source link

No activations detected #1

Closed yangbincv closed 2 months ago

yangbincv commented 2 months ago

Thank you very much for open-sourcing the code, while reproducing it, I encountered the error: No activations detected, run forward after add_hooks(model). Where should add_hooks(model) be added to the code?

WalterSimoncini commented 2 months ago

You're welcome! That's strange, could you share the code snippet that caused the error? add_hooks(model) is done automatically by the wrapper here. Does this happen with any model? Or only with a specific one?

If you were to compute FUNGI features without using this library, you would use add_hooks (and related calls) as in this script.

yangbincv commented 2 months ago

Thank you for your reply, the problem has been solved. The cause was a mismatch of torch versions.