Shortcuts

Template Struct ConvTransposeOptions

Page Contents

Struct Documentation

template<size_t D>
struct torch::nn::ConvTransposeOptions

Public Types

using padding_mode_t = detail::conv_padding_mode_t

Public Functions

ConvTransposeOptions(int64_t in_channels, int64_t out_channels, ExpandingArray<D> kernel_size)
auto in_channels(const int64_t &new_in_channels) -> decltype(*this)

The number of channels the input volumes will have.

Changing this parameter after construction has no effect.

auto in_channels(int64_t &&new_in_channels) -> decltype(*this)
const int64_t &in_channels() const noexcept
int64_t &in_channels() noexcept
auto out_channels(const int64_t &new_out_channels) -> decltype(*this)

The number of output channels the convolution should produce.

Changing this parameter after construction has no effect.

auto out_channels(int64_t &&new_out_channels) -> decltype(*this)
const int64_t &out_channels() const noexcept
int64_t &out_channels() noexcept
auto kernel_size(const ExpandingArray<D> &new_kernel_size) -> decltype(*this)

The kernel size to use.

For a D-dim convolution, must be a single number or a list of D numbers. This parameter can be changed after construction.

auto kernel_size(ExpandingArray<D> &&new_kernel_size) -> decltype(*this)
const ExpandingArray<D> &kernel_size() const noexcept
ExpandingArray<D> &kernel_size() noexcept
auto stride(const ExpandingArray<D> &new_stride) -> decltype(*this)

The stride of the convolution.

For a D-dim convolution, must be a single number or a list of D numbers. This parameter can be changed after construction.

auto stride(ExpandingArray<D> &&new_stride) -> decltype(*this)
const ExpandingArray<D> &stride() const noexcept
ExpandingArray<D> &stride() noexcept
auto padding(const ExpandingArray<D> &new_padding) -> decltype(*this)

The padding to add to the input volumes.

For a D-dim convolution, must be a single number or a list of D numbers. This parameter can be changed after construction.

auto padding(ExpandingArray<D> &&new_padding) -> decltype(*this)
const ExpandingArray<D> &padding() const noexcept
ExpandingArray<D> &padding() noexcept
auto output_padding(const ExpandingArray<D> &new_output_padding) -> decltype(*this)

For transpose convolutions, the padding to add to output volumes.

For a D-dim convolution, must be a single number or a list of D numbers. This parameter can be changed after construction.

auto output_padding(ExpandingArray<D> &&new_output_padding) -> decltype(*this)
const ExpandingArray<D> &output_padding() const noexcept
ExpandingArray<D> &output_padding() noexcept
auto groups(const int64_t &new_groups) -> decltype(*this)

The number of convolution groups.

This parameter can be changed after construction.

auto groups(int64_t &&new_groups) -> decltype(*this)
const int64_t &groups() const noexcept
int64_t &groups() noexcept
auto bias(const bool &new_bias) -> decltype(*this)

Whether to add a bias after individual applications of the kernel.

Changing this parameter after construction has no effect.

auto bias(bool &&new_bias) -> decltype(*this)
const bool &bias() const noexcept
bool &bias() noexcept
auto dilation(const ExpandingArray<D> &new_dilation) -> decltype(*this)

The kernel dilation.

For a D-dim convolution, must be a single number or a list of D numbers. This parameter can be changed after construction.

auto dilation(ExpandingArray<D> &&new_dilation) -> decltype(*this)
const ExpandingArray<D> &dilation() const noexcept
ExpandingArray<D> &dilation() noexcept
auto padding_mode(const padding_mode_t &new_padding_mode) -> decltype(*this)

Accepted values torch::kZeros, torch::kReflect, torch::kReplicate or torch::kCircular.

Default: torch::kZeros

auto padding_mode(padding_mode_t &&new_padding_mode) -> decltype(*this)
const padding_mode_t &padding_mode() const noexcept
padding_mode_t &padding_mode() noexcept

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