Shortcuts

Struct UnfoldOptions

Page Contents

Struct Documentation

struct torch::nn::UnfoldOptions

Options for the Unfold module.

Example:

Unfold model(UnfoldOptions({2, 4}).dilation(2).padding({2, 1}).stride(2));

Public Functions

UnfoldOptions(ExpandingArray<2> kernel_size)
auto kernel_size(const ExpandingArray<2> &new_kernel_size) -> decltype(*this)

the size of the sliding blocks

auto kernel_size(ExpandingArray<2> &&new_kernel_size) -> decltype(*this)
const ExpandingArray<2> &kernel_size() const noexcept
ExpandingArray<2> &kernel_size() noexcept
auto dilation(const ExpandingArray<2> &new_dilation) -> decltype(*this)

controls the spacing between the kernel points; also known as the à trous algorithm.

auto dilation(ExpandingArray<2> &&new_dilation) -> decltype(*this)
const ExpandingArray<2> &dilation() const noexcept
ExpandingArray<2> &dilation() noexcept
auto padding(const ExpandingArray<2> &new_padding) -> decltype(*this)

controls the amount of implicit zero-paddings on both sides for padding number of points for each dimension before reshaping.

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

controls the stride for the sliding blocks.

auto stride(ExpandingArray<2> &&new_stride) -> decltype(*this)
const ExpandingArray<2> &stride() const noexcept
ExpandingArray<2> &stride() 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