Rate this Page

Template Struct ConvOptions#

Struct Documentation#

template<size_tD>
structConvOptions#

Options for aD-dimensional convolution module.

Public Types

usingpadding_mode_t=detail::conv_padding_mode_t#
usingpadding_t=detail::conv_padding_t<D>#

Public Functions

inlineConvOptions(int64_tin_channels,int64_tout_channels,ExpandingArray<D>kernel_size)#
inlineautoin_channels(constint64_t&new_in_channels)->decltype(*this)#

The number of channels the input volumes will have.

Changing this parameter after constructionhas no effect.

inlineautoin_channels(int64_t&&new_in_channels)->decltype(*this)#
inlineconstint64_t&in_channels()constnoexcept#
inlineint64_t&in_channels()noexcept#
inlineautoout_channels(constint64_t&new_out_channels)->decltype(*this)#

The number of output channels the convolution should produce.

Changing this parameter after constructionhas no effect.

inlineautoout_channels(int64_t&&new_out_channels)->decltype(*this)#
inlineconstint64_t&out_channels()constnoexcept#
inlineint64_t&out_channels()noexcept#
inlineautokernel_size(constExpandingArray<D>&new_kernel_size)->decltype(*this)#

The kernel size to use.

For aD-dim convolution, must be a single number or a list ofD numbers. This parametercan be changed after construction.

inlineautokernel_size(ExpandingArray<D>&&new_kernel_size)->decltype(*this)#
inlineconstExpandingArray<D>&kernel_size()constnoexcept#
inlineExpandingArray<D>&kernel_size()noexcept#
inlineautostride(constExpandingArray<D>&new_stride)->decltype(*this)#

The stride of the convolution.

For aD-dim convolution, must be a single number or a list ofD numbers. This parametercan be changed after construction.

inlineautostride(ExpandingArray<D>&&new_stride)->decltype(*this)#
inlineconstExpandingArray<D>&stride()constnoexcept#
inlineExpandingArray<D>&stride()noexcept#
inlineautopadding(constpadding_t&new_padding)->decltype(*this)#

The padding to add to the input volumes.

For aD-dim convolution, must be a single number or a list ofD numbers. This parametercan be changed after construction.

inlineautopadding(padding_t&&new_padding)->decltype(*this)#
inlineconstpadding_t&padding()constnoexcept#
inlinepadding_t&padding()noexcept#
inlineautopadding(std::initializer_list<int64_t>il)#
inlineautodilation(constExpandingArray<D>&new_dilation)->decltype(*this)#

The kernel dilation.

For aD-dim convolution, must be a single number or a list ofD numbers. This parametercan be changed after construction.

inlineautodilation(ExpandingArray<D>&&new_dilation)->decltype(*this)#
inlineconstExpandingArray<D>&dilation()constnoexcept#
inlineExpandingArray<D>&dilation()noexcept#
inlineautogroups(constint64_t&new_groups)->decltype(*this)#

The number of convolution groups.

This parametercan be changed after construction.

inlineautogroups(int64_t&&new_groups)->decltype(*this)#
inlineconstint64_t&groups()constnoexcept#
inlineint64_t&groups()noexcept#
inlineautobias(constbool&new_bias)->decltype(*this)#

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

Changing this parameter after constructionhas no effect.

inlineautobias(bool&&new_bias)->decltype(*this)#
inlineconstbool&bias()constnoexcept#
inlinebool&bias()noexcept#
inlineautopadding_mode(constpadding_mode_t&new_padding_mode)->decltype(*this)#

Accepted valuestorch::kZeros,torch::kReflect,torch::kReplicate ortorch::kCircular.

Default:torch::kZeros

inlineautopadding_mode(padding_mode_t&&new_padding_mode)->decltype(*this)#
inlineconstpadding_mode_t&padding_mode()constnoexcept#
inlinepadding_mode_t&padding_mode()noexcept#