Shortcuts

Class DropoutImpl

Inheritance Relationships

Base Type

Class Documentation

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

Applies dropout over a 1-D input.

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

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

Example:

Dropout model(DropoutOptions().p(0.42).inplace(true));

Public Functions

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

Pretty prints the Dropout 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