Shortcuts

Template Struct AvgPoolOptions

Page Contents

Struct Documentation

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

Options for a D-dimensional avgpool module.

Public Functions

AvgPoolOptions(ExpandingArray<D> kernel_size)
auto kernel_size(const ExpandingArray<D> &new_kernel_size) -> decltype(*this)

the size of the window to take an average over

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 window. Default value is kernel_size

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)

implicit zero padding to be added on both sides

auto padding(ExpandingArray<D> &&new_padding) -> decltype(*this)
const ExpandingArray<D> &padding() const noexcept
ExpandingArray<D> &padding() noexcept
auto ceil_mode(const bool &new_ceil_mode) -> decltype(*this)

when True, will use ceil instead of floor to compute the output shape

auto ceil_mode(bool &&new_ceil_mode) -> decltype(*this)
const bool &ceil_mode() const noexcept
bool &ceil_mode() noexcept
auto count_include_pad(const bool &new_count_include_pad) -> decltype(*this)

when True, will include the zero-padding in the averaging calculation

auto count_include_pad(bool &&new_count_include_pad) -> decltype(*this)
const bool &count_include_pad() const noexcept
bool &count_include_pad() noexcept
auto divisor_override(const c10::optional<int64_t> &new_divisor_override) -> decltype(*this)

if specified, it will be used as divisor, otherwise size of the pooling region will be used.

auto divisor_override(c10::optional<int64_t> &&new_divisor_override) -> decltype(*this)
const c10::optional<int64_t> &divisor_override() const noexcept
c10::optional<int64_t> &divisor_override() 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