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 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¶
-
inline auto align_corners(const std::optional<bool> &new_align_corners) -> decltype(*this)¶
Specifies perspective to pixel as point. Default: false.
-
inline auto align_corners(std::optional<bool> &&new_align_corners) -> decltype(*this)¶
-
inline const std::optional<bool> &align_corners() const noexcept¶
-
inline std::optional<bool> &align_corners() noexcept¶
-
typedef std::variant<enumtype::kZeros, enumtype::kBorder, enumtype::kReflection> padding_mode_t¶