facebookresearch / vissl

VISSL is FAIR's library of extensible, modular and scalable components for SOTA Self-Supervised Learning with images.
https://vissl.ai
MIT License
3.25k stars 332 forks source link

"on_forward"-hook operations and back-propagation #567

Open bruel-gabrielsson opened 2 years ago

bruel-gabrielsson commented 2 years ago

Hey! Is it not possible to put operations in the "on_forward" hook that are incorporated into the back-propagation? E.g. I might do some operations in the "on_forward"-hook that I assign to self.task.key that I later use in the loss and that I want to part of the back-propagation. If so, where can I see this in the code?