Skip to content

reduction is always 'mean' #14

@tkbadamdorj

Description

@tkbadamdorj

Setting reduction = 'sum' does not work because of this line:

if self._reduction:
    merged_grad[shared] = torch.stack([g[shared]
                                   for g in pc_grad]).mean(dim=0)

because if reduction is a string, self._reduction is always True

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