Shortcuts

Program Listing for File dropout.h

Return to documentation for file (torch/csrc/api/include/torch/nn/options/dropout.h)

#pragma once

#include <torch/arg.h>
#include <torch/csrc/Export.h>
#include <torch/types.h>

namespace torch {
namespace 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 nn
} // namespace torch

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources