Skip to content

Why is the input saved in the GradientRescaleFunction? #2

@arturandre

Description

@arturandre

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions