Shortcuts

Program Listing for File fold.h

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

#pragma once

#include <torch/arg.h>
#include <torch/csrc/WindowsTorchApiMacro.h>
#include <torch/expanding_array.h>
#include <torch/types.h>

namespace torch {
namespace nn {

struct TORCH_API FoldOptions {
  FoldOptions(ExpandingArray<2> output_size, ExpandingArray<2> kernel_size)
      // NOLINTNEXTLINE(performance-move-const-arg)
      : output_size_(std::move(output_size)),
        // NOLINTNEXTLINE(performance-move-const-arg)
        kernel_size_(std::move(kernel_size)) {}

  TORCH_ARG(ExpandingArray<2>, output_size);

  TORCH_ARG(ExpandingArray<2>, kernel_size);

  TORCH_ARG(ExpandingArray<2>, dilation) = 1;

  TORCH_ARG(ExpandingArray<2>, padding) = 0;

  TORCH_ARG(ExpandingArray<2>, stride) = 1;
};

namespace functional {
using FoldFuncOptions = FoldOptions;
} // namespace functional

// ============================================================================

struct TORCH_API UnfoldOptions {
  UnfoldOptions(ExpandingArray<2> kernel_size)
      // NOLINTNEXTLINE(performance-move-const-arg)
      : kernel_size_(std::move(kernel_size)) {}

  TORCH_ARG(ExpandingArray<2>, kernel_size);

  TORCH_ARG(ExpandingArray<2>, dilation) = 1;

  TORCH_ARG(ExpandingArray<2>, padding) = 0;

  TORCH_ARG(ExpandingArray<2>, stride) = 1;
};

namespace functional {
using UnfoldFuncOptions = UnfoldOptions;
} // 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