Struct GridSampleFuncOptions
Defined in File vision.h
Page Contents
Struct Documentation
-
struct GridSampleFuncOptions
Options for
torch::nn::functional::grid_sample
.Example:
namespace F = torch::nn::functional; F::grid_sample(input, grid, F::GridSampleFuncOptions().mode(torch::kBilinear).padding_mode(torch::kZeros).align_corners(true));
Public Types
-
typedef std::variant<enumtype::kZeros, enumtype::kBorder, enumtype::kReflection> padding_mode_t
Public Functions
-
inline auto mode(const mode_t &new_mode) -> decltype(*this)
interpolation mode to calculate output values. Default: Bilinear
-
inline auto mode(mode_t &&new_mode) -> decltype(*this)
-
inline const mode_t &mode() const noexcept
-
inline mode_t &mode() noexcept
-
inline auto padding_mode(const padding_mode_t &new_padding_mode) -> decltype(*this)
padding mode for outside grid values. Default: Zeros
-
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
-
typedef std::variant<enumtype::kZeros, enumtype::kBorder, enumtype::kReflection> padding_mode_t