Shortcuts

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 {
namespace nn {
namespace functional {

struct TORCH_API GridSampleFuncOptions {
  typedef std::variant<enumtype::kBilinear, enumtype::kNearest> 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(c10::optional<bool>, align_corners) = c10::nullopt;
};

} // namespace functional
} // namespace nn
} // namespace torch

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources