MolecularDiffusion.modules.layers.equiformer_v2.drop

Copyright (c) Meta Platforms, Inc. and affiliates.

Add extra_repr into DropPath implemented by timm for displaying more info.

Classes

DropPath

Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).

EquivariantDropout

EquivariantDropoutArraySphericalHarmonics

EquivariantScalarsDropout

GraphDropPath

Consider batch for graph data when dropping paths.

Functions

drop_path(x[, drop_prob, training])

Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).

Module Contents

class MolecularDiffusion.modules.layers.equiformer_v2.drop.DropPath(drop_prob=None)

Bases: torch.nn.Module

Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).

extra_repr()
forward(x)
drop_prob = None
class MolecularDiffusion.modules.layers.equiformer_v2.drop.EquivariantDropout(irreps, drop_prob)

Bases: torch.nn.Module

forward(x)
drop
drop_prob
irreps
mul
num_irreps
class MolecularDiffusion.modules.layers.equiformer_v2.drop.EquivariantDropoutArraySphericalHarmonics(drop_prob, drop_graph=False)

Bases: torch.nn.Module

extra_repr()
forward(x, batch=None)
drop
drop_graph = False
drop_prob
class MolecularDiffusion.modules.layers.equiformer_v2.drop.EquivariantScalarsDropout(irreps, drop_prob)

Bases: torch.nn.Module

extra_repr()
forward(x)
drop_prob
irreps
class MolecularDiffusion.modules.layers.equiformer_v2.drop.GraphDropPath(drop_prob=None)

Bases: torch.nn.Module

Consider batch for graph data when dropping paths.

extra_repr()
forward(x, batch)
drop_prob = None
MolecularDiffusion.modules.layers.equiformer_v2.drop.drop_path(x, drop_prob: float = 0.0, training: bool = False)

Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).

This is the same as the DropConnect impl I created for EfficientNet, etc networks, however, the original name is misleading as ‘Drop Connect’ is a different form of dropout in a separate paper… See discussion: https://github.com/tensorflow/tpu/issues/494#issuecomment-532968956 … I’ve opted for changing the layer and argument names to ‘drop path’ rather than mix DropConnect as a layer name and use ‘survival rate’ as the argument.