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

Class DropPath

CV/Pytorch_classification/EfficientNet/model.py:46–56  ·  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

44 return output
45
46class DropPath(nn.Module):
47 """
48 Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
49 "Deep Networks with Stochastic Depth", https://arxiv.org/pdf/1603.09382.pdf
50 """
51 def __init__(self, drop_prob=None):
52 super(DropPath, self).__init__()
53 self.drop_prob = drop_prob
54
55 def forward(self, x):
56 return drop_path(x, self.drop_prob, self.training)
57
58
59class ConvBNActivation(nn.Sequential):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected