Shortcuts

Class Conv2dImpl

Inheritance Relationships

Base Type

Class Documentation

class Conv2dImpl : public torch::nn::ConvNdImpl<2, Conv2dImpl>

Applies convolution over a 2-D input.

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

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

Example:

Conv2d model(Conv2dOptions(3, 2, 3).stride(1).bias(false));

Public Functions

inline Conv2dImpl(int64_t input_channels, int64_t output_channels, ExpandingArray<2> kernel_size)
explicit Conv2dImpl(Conv2dOptions options_)
Tensor forward(const Tensor &input)

Protected Functions

Tensor _conv_forward(const Tensor &input, const Tensor &weight)

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