mr2.nn.DropPath
- class mr2.nn.DropPath[source]
Bases:
ModuleDrop path or stochastic depth.
Drops full samples from batch with probability
droprate. Should be used in the main path of a Resblock.References
[HUANG16]Huang, G., Sun, Y., Liu, Z., Sedra, D., & Weinberger, K. Q. Deep networks with stochastic depth. ECCV 2016. https://link.springer.com/chapter/10.1007/978-3-319-46493-0_39
- __init__(droprate: float = 0.0, scale_by_keep: bool = False) None[source]
Initialize the DropPath module.
- Parameters:
- Raises:
ValueError – If
droprateis outside [0, 1].