IMTA
IMTA copied to clipboard
Why is the input saved in the GradientRescaleFunction?
At the forward method on the GradientRescaleFunction, the input tensor is saved to be used in the backward function:
https://github.com/kalviny/IMTA/blob/a9378373241c3247db01f826e3cd8025702fa54b/models/msdnet_ge.py#LL11C6-L11C6
and at the backward function, the saved input is retrieved:
https://github.com/kalviny/IMTA/blob/a9378373241c3247db01f826e3cd8025702fa54b/models/msdnet_ge.py#LL19C10-L19C10
however, it is never used in the backward function. So is there any reason for saving the input in the first place?