Struct UpsampleOptions¶
Defined in File upsampling.h
Page Contents
Struct Documentation¶
-
struct
torch::nn
::
UpsampleOptions
¶ Options for the
Upsample
module.Example:
Upsample model(UpsampleOptions().scale_factor(std::vector<double>({3})).mode(torch::kLinear).align_corners(false));
Public Functions
-
auto
size
(const c10::optional<std::vector<int64_t>> &new_size) -> decltype(*this)¶ output spatial sizes.
-
auto
scale_factor
(const c10::optional<std::vector<double>> &new_scale_factor) -> decltype(*this)¶ multiplier for spatial size.
-
auto
mode
(const mode_t &new_mode) -> decltype(*this)¶
-
auto
mode
(mode_t &&new_mode) -> decltype(*this)¶
-
const mode_t &
mode
() const noexcept¶
-
mode_t &
mode
() noexcept¶
-
auto
align_corners
(const c10::optional<bool> &new_align_corners) -> decltype(*this)¶ if “True”, the corner pixels of the input and output tensors are aligned, and thus preserving the values at those pixels.
This only has effect when :attr:
mode
is “linear”, “bilinear”, “bicubic”, or “trilinear”. Default: “False”
-
auto