Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
| 158 | |
| 159 | |
| 160 | class DropPath(nn.Module): |
| 161 | """Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). |
| 162 | """ |
| 163 | def __init__(self, drop_prob=None): |
| 164 | super(DropPath, self).__init__() |
| 165 | self.drop_prob = drop_prob |
| 166 | |
| 167 | def forward(self, x): |
| 168 | return drop_path(x, self.drop_prob, self.training) |
no outgoing calls
no test coverage detected