MCPcopy Create free account
hub / github.com/Sirwenhao/Deep-Learning-Notes / DropPath

Class DropPath

CV/Pytorch_classification/model_complexity/model.py:31–41  ·  view source on GitHub ↗

Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). "Deep Networks with Stochastic Depth", https://arxiv.org/pdf/1603.09382.pdf

Source from the content-addressed store, hash-verified

29
30
31class DropPath(nn.Module):
32 """
33 Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
34 "Deep Networks with Stochastic Depth", https://arxiv.org/pdf/1603.09382.pdf
35 """
36 def __init__(self, drop_prob=None):
37 super(DropPath, self).__init__()
38 self.drop_prob = drop_prob
39
40 def forward(self, x):
41 return drop_path(x, self.drop_prob, self.training)
42
43
44class ConvBNAct(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected