MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / DropPath

Class DropPath

encoders/dinov2/layers/drop_path.py:26–34  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

24
25
26class DropPath(nn.Module):
27 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks)."""
28
29 def __init__(self, drop_prob=None):
30 super(DropPath, self).__init__()
31 self.drop_prob = drop_prob
32
33 def forward(self, x):
34 return drop_path(x, self.drop_prob, self.training)

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected