Skip to content

Apply scale loss when performing accum_freq #957

@AshStuff

Description

@AshStuff

In this line

backward(total_loss, scaler)

We are trying to accumulate the gradients and perform optimizer step only after we accumulate gradients for accum_freq steps.

I am wondering whether do we need to divide the total_loss by accum_freq to scale the loss properly.

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