MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / DropPath

Class DropPath

PATH/core/models/backbones/vitdet.py:31–43  ·  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

29
30
31class DropPath(nn.Module):
32 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
33 """
34
35 def __init__(self, drop_prob=None):
36 super(DropPath, self).__init__()
37 self.drop_prob = drop_prob
38
39 def forward(self, x):
40 return drop_path(x, self.drop_prob, self.training)
41
42 def extra_repr(self):
43 return 'p={}'.format(self.drop_prob)
44
45
46class QuickGELU(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected