mirror of
https://github.com/pytorch/pytorch.git
synced 2026-10-28 18:56:51 +08:00
The fix-cpp-build branch is a major restructuring that: - Drops Exhale (which auto-generated API docs but caused OOM in CI) in favor of hand-written RST pages using Breathe directives - Reorganizes notes into a hierarchical API reference with proper categories - Adds new content: XPU docs, stable ABI docs, DeviceGuard/Stream docs - Always runs Doxygen instead of gating on an env var Pull Request resolved: https://github.com/pytorch/pytorch/pull/174096 Approved by: https://github.com/janeyx99, https://github.com/seemethere, https://github.com/albanD
1.7 KiB
1.7 KiB
myst
| myst | ||||||
|---|---|---|---|---|---|---|
|
Dropout Layers
Dropout randomly zeros elements during training as a regularization technique, preventing overfitting by forcing the network to learn redundant representations. During evaluation, dropout is disabled and outputs are scaled appropriately.
- Dropout: Standard dropout for fully-connected layers
- Dropout2d/3d: Spatial dropout that zeros entire channels (better for CNNs)
- AlphaDropout: Maintains self-normalizing property (use with SELU activation)
Remember to call `model->train()` during training and `model->eval()` during
inference to properly enable/disable dropout behavior.
Dropout
:members:
:undoc-members:
:members:
:undoc-members:
Example:
auto dropout = torch::nn::Dropout(torch::nn::DropoutOptions(0.5));
Dropout2d / Dropout3d
:members:
:undoc-members:
:members:
:undoc-members:
:members:
:undoc-members:
:members:
:undoc-members:
AlphaDropout
:members:
:undoc-members:
:members:
:undoc-members:
FeatureAlphaDropout
:members:
:undoc-members:
:members:
:undoc-members: