:github_url: https://github.com/pytorch/pytorch .. _program_listing_file_torch_csrc_api_include_torch_nn_options_upsampling.h: Program Listing for File upsampling.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``torch/csrc/api/include/torch/nn/options/upsampling.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include #include #include #include #include namespace torch::nn { struct TORCH_API UpsampleOptions { TORCH_ARG(std::optional>, size) = std::nullopt; TORCH_ARG(std::optional>, scale_factor) = std::nullopt; typedef std::variant< enumtype::kNearest, enumtype::kLinear, enumtype::kBilinear, enumtype::kBicubic, enumtype::kTrilinear> mode_t; TORCH_ARG(mode_t, mode) = torch::kNearest; TORCH_ARG(std::optional, align_corners) = std::nullopt; }; namespace functional { struct TORCH_API InterpolateFuncOptions { typedef std::variant< enumtype::kNearest, enumtype::kLinear, enumtype::kBilinear, enumtype::kBicubic, enumtype::kTrilinear, enumtype::kArea, enumtype::kNearestExact> mode_t; TORCH_ARG(std::optional>, size) = std::nullopt; TORCH_ARG(std::optional>, scale_factor) = std::nullopt; TORCH_ARG(mode_t, mode) = torch::kNearest; TORCH_ARG(std::optional, align_corners) = std::nullopt; TORCH_ARG(std::optional, recompute_scale_factor) = std::nullopt; TORCH_ARG(bool, antialias) = false; }; } // namespace functional } // namespace torch::nn