Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
| 51 | |
| 52 | |
| 53 | class 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 | |
| 64 | class Identity(nn.Layer): |
no outgoing calls
no test coverage detected
searching dependent graphs…