컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: FusedResizeAndPadConv2D
#include <nn_ops.h>
컨볼루션 중 전처리로 크기 조정 및 패딩을 수행합니다.
요약
컨볼루션의 패킹 단계의 일부로 공간 변환을 보다 효율적으로 수행하는 것이 가능한 경우가 많으므로 이 작업을 통해 이러한 단계가 융합되는 최적화된 구현이 가능합니다. 이렇게 하면 중간 결과를 전체 텐서로 작성할 필요가 없어 메모리 부담이 줄어들고 변환 계산을 병합하여 약간의 대기 시간 이득을 얻을 수 있습니다. Conv2D 의 data_format 속성은 이 작업에서 지원되지 않으며 기본값은 'NHWC' 순서입니다. 내부적으로 이 작업은 그래프당 단일 스크래치 버퍼를 사용합니다. 즉, 여러 버전이 병렬로 실행되는 경우 차단됩니다. 이는 이 연산자가 주로 메모리 사용량을 최소화하기 위한 최적화이기 때문입니다.
인수:
- 범위: 범위 개체
- 입력:
[batch, in_height, in_width, in_channels]
모양의 4D. - 크기: 2개 요소로 구성된 1차원 int32 텐서 :
new_height, new_width
. 이미지의 새로운 크기입니다. - 패딩: 패딩 크기를 지정하는 2열 행렬입니다. 행 개수는
input
순위와 동일해야 합니다. - 필터:
[filter_height, filter_width, in_channels, out_channels]
모양의 4차원입니다. - strides: 길이 4의 1-D.
input
의 각 차원에 대한 슬라이딩 윈도우의 보폭입니다. 형식으로 지정된 측정기준과 순서가 동일해야 합니다. - padding: 사용할 패딩 알고리즘 유형입니다.
선택적 속성( Attrs
참조):
- resize_align_corners: true인 경우 입력 및 출력 텐서의 4개 모서리 픽셀의 중심이 정렬되어 모서리 픽셀의 값을 유지합니다. 기본값은 거짓입니다.
보고:
생성자와 소멸자 |
---|
FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding)
|
FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding, const FusedResizeAndPadConv2D::Attrs & attrs) |
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
크기 조정모서리 정렬
Attrs ResizeAlignCorners(
bool x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::FusedResizeAndPadConv2D Class Reference\n\ntensorflow::ops::FusedResizeAndPadConv2D\n========================================\n\n`#include \u003cnn_ops.h\u003e`\n\nPerforms a resize and padding as a preprocess during a convolution.\n\nSummary\n-------\n\nIt's often possible to do spatial transformations more efficiently as part of the packing stage of a convolution, so this op allows for an optimized implementation where these stages are fused together. This prevents the need to write out the intermediate results as whole tensors, reducing memory pressure, and we can get some latency gains by merging the transformation calculations. The data_format attribute for [Conv2D](/versions/r1.15/api_docs/cc/class/tensorflow/ops/conv2-d#classtensorflow_1_1ops_1_1_conv2_d) isn't supported by this op, and defaults to 'NHWC' order. Internally this op uses a single per-graph scratch buffer, which means that it will block if multiple versions are being run in parallel. This is because this operator is primarily an optimization to minimize memory usage.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D with shape `[batch, in_height, in_width, in_channels]`.\n- size: A 1-D int32 [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of 2 elements: `new_height, new_width`. The new size for the images.\n- paddings: A two-column matrix specifying the padding sizes. The number of rows must be the same as the rank of `input`.\n- filter: 4-D with shape `[filter_height, filter_width, in_channels, out_channels]`.\n- strides: 1-D of length 4. The stride of the sliding window for each dimension of `input`. Must be in the same order as the dimension specified with format.\n- padding: The type of padding algorithm to use.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-resize-and-pad-conv2-d/attrs#structtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1_1_attrs)):\n\n- resize_align_corners: If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. Defaults to false.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FusedResizeAndPadConv2D](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1afdac6e55ba14082f1b161c3892feb79c)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` paddings, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` filter, StringPiece mode, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding)` ||\n| [FusedResizeAndPadConv2D](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1ab05dac1d726214f232015fa7696ee523)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` paddings, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` filter, StringPiece mode, const gtl::ArraySlice\u003c int \u003e & strides, StringPiece padding, const `[FusedResizeAndPadConv2D::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-resize-and-pad-conv2-d/attrs#structtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1a452db77c1530086287369d18c4e67196) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1ad8619b45c03b5aa399ef784c4b5d96a5) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1ad006395b5772a9dad02d7e8aec083755)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1ad64d511881de03b3de360bc2d09af397)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1a0ae5c811852f315f2b5cc87682ca69a3)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [ResizeAlignCorners](#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1a26a1da31c5f264b43033f67ce65063c0)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-resize-and-pad-conv2-d/attrs#structtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FusedResizeAndPadConv2D::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/fused-resize-and-pad-conv2-d/attrs) | Optional attribute setters for [FusedResizeAndPadConv2D](/versions/r1.15/api_docs/cc/class/tensorflow/ops/fused-resize-and-pad-conv2-d#classtensorflow_1_1ops_1_1_fused_resize_and_pad_conv2_d). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### FusedResizeAndPadConv2D\n\n```gdscript\n FusedResizeAndPadConv2D(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input size,\n ::tensorflow::Input paddings,\n ::tensorflow::Input filter,\n StringPiece mode,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding\n)\n``` \n\n### FusedResizeAndPadConv2D\n\n```gdscript\n FusedResizeAndPadConv2D(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input size,\n ::tensorflow::Input paddings,\n ::tensorflow::Input filter,\n StringPiece mode,\n const gtl::ArraySlice\u003c int \u003e & strides,\n StringPiece padding,\n const FusedResizeAndPadConv2D::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### ResizeAlignCorners\n\n```text\nAttrs ResizeAlignCorners(\n bool x\n)\n```"]]