Skip to content

Add on_after_backwards callback option #3657

@rbracco

Description

@rbracco

🚀 Feature

Add an on_after_backward callback option.

Motivation

Currently there are no callbacks for after the backwards step so non-essential code like logging gradients clutters the LightningModule.

Pitch

Expand the callback options to include a hook for on_after_backward() to execute callbacks immediately after the backwards pass

Alternatives

Sticking my non-essential gradient logging code in my LightningModule

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIs an improvement or enhancementhelp wantedOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions