Template Struct ConvOptions¶
Defined in File conv.h
Page Contents
Struct Documentation¶
-
template<size_t D>
struct ConvOptions¶ Options for a
D
-dimensional convolution module.Public Types
-
using padding_mode_t = detail::conv_padding_mode_t¶
-
using padding_t = detail::conv_padding_t<D>¶
Public Functions
-
inline ConvOptions(int64_t in_channels, int64_t out_channels, ExpandingArray<D> kernel_size)¶
-
inline 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.
-
inline auto in_channels(int64_t &&new_in_channels) -> decltype(*this)¶
-
inline const int64_t &in_channels() const noexcept¶
-
inline int64_t &in_channels() noexcept¶
-
inline 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.
-
inline auto out_channels(int64_t &&new_out_channels) -> decltype(*this)¶
-
inline const int64_t &out_channels() const noexcept¶
-
inline int64_t &out_channels() noexcept¶
-
inline 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 ofD
numbers. This parameter can be changed after construction.
-
inline auto kernel_size(ExpandingArray<D> &&new_kernel_size) -> decltype(*this)¶
-
inline const ExpandingArray<D> &kernel_size() const noexcept¶
-
inline ExpandingArray<D> &kernel_size() noexcept¶
-
inline 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 ofD
numbers. This parameter can be changed after construction.
-
inline auto stride(ExpandingArray<D> &&new_stride) -> decltype(*this)¶
-
inline const ExpandingArray<D> &stride() const noexcept¶
-
inline ExpandingArray<D> &stride() noexcept¶
-
inline auto padding(const padding_t &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 ofD
numbers. This parameter can be changed after construction.
-
inline decltype(auto) padding(std::initializer_list<int64_t> il)¶
-
inline 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 ofD
numbers. This parameter can be changed after construction.
-
inline auto dilation(ExpandingArray<D> &&new_dilation) -> decltype(*this)¶
-
inline const ExpandingArray<D> &dilation() const noexcept¶
-
inline ExpandingArray<D> &dilation() noexcept¶
-
inline auto groups(const int64_t &new_groups) -> decltype(*this)¶
The number of convolution groups.
This parameter can be changed after construction.
-
inline auto groups(int64_t &&new_groups) -> decltype(*this)¶
-
inline const int64_t &groups() const noexcept¶
-
inline int64_t &groups() noexcept¶
-
inline 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.
-
inline auto bias(bool &&new_bias) -> decltype(*this)¶
-
inline const bool &bias() const noexcept¶
-
inline bool &bias() noexcept¶
-
inline auto padding_mode(const padding_mode_t &new_padding_mode) -> decltype(*this)¶
Accepted values
torch::kZeros
,torch::kReflect
,torch::kReplicate
ortorch::kCircular
.Default:
torch::kZeros
-
inline auto padding_mode(padding_mode_t &&new_padding_mode) -> decltype(*this)¶
-
inline const padding_mode_t &padding_mode() const noexcept¶
-
inline padding_mode_t &padding_mode() noexcept¶
-
using padding_mode_t = detail::conv_padding_mode_t¶