Skip to content

Code explanation in gather.py #33

@littleredxh

Description

@littleredxh

Hi, Janne

The GatherLayer module in gather.py is smart and efficient. I really appreciate this module.

I almost understand most of the functions of the codes but still confuse at one point.

line 19 of SimCLR/simclr/modules/gather.py

    grad_out[:] = grads[dist.get_rank()]

Would you mind explaining it in more detail?

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