MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / DropPath

Class DropPath

benchmark/models/zipmap/zipmap/layers/drop_path.py:21–29  ·  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

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

Callers 3

__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected