MCPcopy Create free account
hub / github.com/alinlab/SelfPatch / DropPath

Class DropPath

detection/backbone/vit_SelfPatch.py:38–46  ·  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

36
37
38class DropPath(nn.Module):
39 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
40 """
41 def __init__(self, drop_prob=None):
42 super(DropPath, self).__init__()
43 self.drop_prob = drop_prob
44
45 def forward(self, x):
46 return drop_path(x, self.drop_prob, self.training)
47
48
49class Mlp(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected