MCPcopy Create free account
hub / github.com/microsoft/Cream / DropPath

Class DropPath

AutoFormer/model/utils.py:91–99  ·  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

89
90
91class DropPath(nn.Module):
92 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
93 """
94 def __init__(self, drop_prob=None):
95 super(DropPath, self).__init__()
96 self.drop_prob = drop_prob
97
98 def forward(self, x):
99 return drop_path(x, self.drop_prob, self.training)
100
101
102to_1tuple = _ntuple(1)

Callers 9

__init__Method · 0.90
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50
__init__Method · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected