MCPcopy
hub / github.com/PaddlePaddle/PaddleOCR / DropPath

Class DropPath

ppocr/modeling/backbones/rec_vit_parseq.py:53–61  ·  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

51
52
53class DropPath(nn.Layer):
54 """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks)."""
55
56 def __init__(self, drop_prob=None):
57 super(DropPath, self).__init__()
58 self.drop_prob = drop_prob
59
60 def forward(self, x):
61 return drop_path(x, self.drop_prob, self.training)
62
63
64class Identity(nn.Layer):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…