Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
tensoreflusso:: ops:: FusedResizeAndPadConv2D
#include <nn_ops.h>
Esegue il ridimensionamento e il riempimento come preelaborazione durante una convoluzione.
Riepilogo
Spesso è possibile eseguire trasformazioni spaziali in modo più efficiente come parte della fase di impaccamento di una convoluzione, quindi questa operazione consente un'implementazione ottimizzata in cui queste fasi sono fuse insieme. Ciò evita la necessità di scrivere i risultati intermedi come interi tensori, riducendo il carico di memoria, e possiamo ottenere alcuni guadagni di latenza unendo i calcoli di trasformazione. L'attributo data_format per Conv2D non è supportato da questa operazione e per impostazione predefinita è impostato l'ordine "NHWC". Internamente questa operazione utilizza un singolo buffer di scratch per grafico, il che significa che si bloccherà se più versioni vengono eseguite in parallelo. Questo perché questo operatore è principalmente un'ottimizzazione per ridurre al minimo l'utilizzo della memoria.
Argomenti:
- scope: un oggetto Scope
- input: 4-D con forma
[batch, in_height, in_width, in_channels]
. - size: Un tensore 1-D int32 di 2 elementi:
new_height, new_width
. La nuova dimensione per le immagini. - riempimenti: una matrice a due colonne che specifica le dimensioni del riempimento. Il numero di righe deve essere uguale al rango
input
. - filter: 4-D con forma
[filter_height, filter_width, in_channels, out_channels]
. - passi: 1-D di lunghezza 4. Il passo della finestra scorrevole per ogni dimensione di
input
. Deve essere nello stesso ordine della dimensione specificata con format. - riempimento: il tipo di algoritmo di riempimento da utilizzare.
Attributi facoltativi (vedi Attrs
):
- resize_align_corners: se vero, i centri dei 4 pixel d'angolo dei tensori di input e output sono allineati, preservando i valori nei pixel d'angolo. Il valore predefinito è falso.
Resi:
-
Output
: il tensore di uscita.
Costruttori e distruttori |
---|
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) |
Attributi pubblici
Funzioni pubbliche
nodo
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatore::tensorflow::Output
operator::tensorflow::Output() const
Funzioni pubbliche statiche
RidimensionaAllineaAngoli
Attrs ResizeAlignCorners(
bool x
)
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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```"]]