Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
tensor akışı:: işlem:: FusedResizeAndPadConv2D
#include <nn_ops.h>
Evrişim sırasında ön işlem olarak yeniden boyutlandırma ve doldurma gerçekleştirir.
Özet
Bir evrişimin paketleme aşamasının bir parçası olarak uzamsal dönüşümleri daha verimli bir şekilde yapmak çoğu zaman mümkündür, dolayısıyla bu işlem, bu aşamaların bir araya getirildiği optimize edilmiş bir uygulamaya izin verir. Bu, ara sonuçları tam tensörler olarak yazma ihtiyacını ortadan kaldırarak hafıza basıncını azaltır ve dönüşüm hesaplamalarını birleştirerek bazı gecikme kazanımları elde edebiliriz. Conv2D'nin data_format özelliği bu operasyon tarafından desteklenmez ve varsayılan olarak 'NHWC' sırasıdır. Dahili olarak bu operasyon, grafik başına tek bir karalama arabelleği kullanır; bu, birden fazla sürümün paralel olarak çalıştırılması durumunda engelleneceği anlamına gelir. Bunun nedeni, bu operatörün öncelikle bellek kullanımını en aza indirmeye yönelik bir optimizasyon olmasıdır.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- giriş: şekilli 4-D
[batch, in_height, in_width, in_channels]
. - boyut: 2 öğeden oluşan 1 boyutlu bir int32 Tensörü :
new_height, new_width
. Görüntüler için yeni boyut. - dolgular: Dolgu boyutlarını belirten iki sütunlu bir matris. Satır sayısı
input
sıralamasıyla aynı olmalıdır. - filtre: 4-D şekilli
[filter_height, filter_width, in_channels, out_channels]
. - adımlar: 1 boyutlu uzunluk 4.
input
her boyutu için kayan pencerenin adımı. Formatla belirtilen boyutla aynı sırada olmalıdır. - padding: Kullanılacak dolgu algoritmasının türü.
İsteğe bağlı özellikler (bkz. Attrs
):
- resize_align_corners: True ise, giriş ve çıkış tensörlerinin 4 köşe pikselinin merkezleri, köşe piksellerindeki değerler korunarak hizalanır. Varsayılan olarak false olur.
İade:
Yapıcılar ve Yıkıcılar |
---|
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) |
Genel özellikler
Kamu işlevleri
düğüm
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Yeniden BoyutlandırKöşeleri Hizala
Attrs ResizeAlignCorners(
bool x
)
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 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```"]]