MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / DropPath

Class DropPath

model/transformer_utils.py:47–55  ·  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

45
46
47class DropPath(nn.Module):
48 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks)."""
49
50 def __init__(self, drop_prob=None):
51 super(DropPath, self).__init__()
52 self.drop_prob = drop_prob
53
54 def forward(self, x):
55 return drop_path(x, self.drop_prob, self.training)
56
57
58class GELU_(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected