Shortcuts

Class Dropout2dImpl

Inheritance Relationships

Base Type

Class Documentation

class Dropout2dImpl : public torch::nn::detail::_DropoutNd<Dropout2dImpl>

Applies dropout over a 2-D input.

See https://pytorch.org/docs/main/nn.html#torch.nn.Dropout2d to learn about the exact behavior of this module.

See the documentation for torch::nn::Dropout2dOptions class to learn what constructor arguments are supported for this module.

Example:

Dropout2d model(Dropout2dOptions().p(0.42).inplace(true));

Public Functions

Tensor forward(Tensor input)
virtual void pretty_print(std::ostream &stream) const override

Pretty prints the Dropout2d module into the given stream.

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