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/Export.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)
: output_size_(std::move(output_size)),
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)
: 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