sakura.utils.gradient_reverse
Gradient reversal layer for pytorch module
- Reference:
Adapted from https://github.com/janfreyberg/pytorch-revgrad/blob/master/src/pytorch_revgrad/functional.py
Classes
Custom autograd Function that nullifies gradients during backward pass |
|
Custom autograd class that reverses and scales gradients during backward pass |