Class Conv2dImpl

Inheritance Relationships

Base Type

Class Documentation

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

Applies convolution over a 2-D input.

See 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.


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)


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources