Skip to content

Questions about grad hook in bagua #476

@ProHuper

Description

@ProHuper

image
Could someone explain how this works? namely, why does it create a new tensor and register hooks on the new tensor’s grad_fn.next_functions[0][0] (what is this function)?

What’s the difference between this and directly register hooks on the original tensor register_hook
image

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions