Program Listing for File pixelshuffle.h¶
↰ Return to documentation for file (torch/csrc/api/include/torch/nn/functional/pixelshuffle.h
)
#pragma once
#include <torch/nn/options/pixelshuffle.h>
namespace torch {
namespace nn {
namespace functional {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace detail {
inline Tensor pixel_shuffle(const Tensor& input, int64_t upscale_factor) {
return torch::pixel_shuffle(input, upscale_factor);
}
inline Tensor pixel_unshuffle(const Tensor& input, int64_t downscale_factor) {
return torch::pixel_unshuffle(input, downscale_factor);
}
} // namespace detail
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
inline Tensor pixel_shuffle(
const Tensor& input,
const PixelShuffleFuncOptions& options) {
return detail::pixel_shuffle(input, options.upscale_factor());
}
inline Tensor pixel_unshuffle(
const Tensor& input,
const PixelUnshuffleFuncOptions& options) {
return detail::pixel_unshuffle(input, options.downscale_factor());
}
} // namespace functional
} // namespace nn
} // namespace torch