MCPcopy Create free account
hub / github.com/FoundationVision/LlamaGen / __init__

Method __init__

utils/drop_path.py:27–30  ·  view source on GitHub ↗
(self, drop_prob: float = 0., scale_by_keep: bool = True)

Source from the content-addressed store, hash-verified

25 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
26 """
27 def __init__(self, drop_prob: float = 0., scale_by_keep: bool = True):
28 super(DropPath, self).__init__()
29 self.drop_prob = drop_prob
30 self.scale_by_keep = scale_by_keep
31
32 def forward(self, x):
33 return drop_path(x, self.drop_prob, self.training, self.scale_by_keep)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected