:github_url: https://github.com/pytorch/pytorch .. _program_listing_file_torch_csrc_api_include_torch_nn_options_dropout.h: Program Listing for File dropout.h ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``torch/csrc/api/include/torch/nn/options/dropout.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include namespace torch::nn { struct TORCH_API DropoutOptions { /* implicit */ DropoutOptions(double p = 0.5); TORCH_ARG(double, p) = 0.5; TORCH_ARG(bool, inplace) = false; }; using Dropout2dOptions = DropoutOptions; using Dropout3dOptions = DropoutOptions; using AlphaDropoutOptions = DropoutOptions; using FeatureAlphaDropoutOptions = DropoutOptions; namespace functional { struct TORCH_API DropoutFuncOptions { TORCH_ARG(double, p) = 0.5; TORCH_ARG(bool, training) = true; TORCH_ARG(bool, inplace) = false; }; using Dropout2dFuncOptions = DropoutFuncOptions; using Dropout3dFuncOptions = DropoutFuncOptions; struct TORCH_API AlphaDropoutFuncOptions { TORCH_ARG(double, p) = 0.5; TORCH_ARG(bool, training) = false; TORCH_ARG(bool, inplace) = false; }; struct TORCH_API FeatureAlphaDropoutFuncOptions { TORCH_ARG(double, p) = 0.5; TORCH_ARG(bool, training) = false; TORCH_ARG(bool, inplace) = false; }; } // namespace functional } // namespace torch::nn