Shortcuts

mmedit.models.base_archs.all_gather_layer

Module Contents

Classes

AllGatherLayer

All gather layer with backward propagation path.

class mmedit.models.base_archs.all_gather_layer.AllGatherLayer(*args, **kwargs)[源代码]

Bases: torch.autograd.Function

All gather layer with backward propagation path.

Indeed, this module is to make dist.all_gather() in the backward graph. Such kind of operation has been widely used in Moco and other contrastive learning algorithms.

static forward(ctx, x)[源代码]

Forward function.

static backward(ctx, *grad_outputs)[源代码]

Backward function.

Read the Docs v: latest
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.