Rate this Page

Program Listing for File vision.h#

Return to documentation for file (torch/csrc/api/include/torch/nn/options/vision.h)

#pragma once

#include <torch/arg.h>
#include <torch/csrc/Export.h>
#include <torch/enum.h>
#include <torch/types.h>

namespace torch::nn::functional {

struct TORCH_API GridSampleFuncOptions {
  typedef std::
      variant<enumtype::kBilinear, enumtype::kNearest, enumtype::kBicubic>
          mode_t;
  typedef std::
      variant<enumtype::kZeros, enumtype::kBorder, enumtype::kReflection>
          padding_mode_t;

  TORCH_ARG(mode_t, mode) = torch::kBilinear;
  TORCH_ARG(padding_mode_t, padding_mode) = torch::kZeros;
  TORCH_ARG(std::optional<bool>, align_corners) = std::nullopt;
};

} // namespace torch::nn::functional