Skip to content

Latest commit

 

History

History
132 lines (100 loc) · 5.23 KB

ns-directml-dml_max_pooling_operator_desc.md

File metadata and controls

132 lines (100 loc) · 5.23 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:directml.DML_MAX_POOLING_OPERATOR_DESC
DML_MAX_POOLING_OPERATOR_DESC
Computes the maximum value across the elements within the sliding window over the input tensor.
DML_MAX_POOLING_OPERATOR_DESC
DML_MAX_POOLING_OPERATOR_DESC structure
direct3d12.dml_max_pooling_operator_desc
directml/DML_MAX_POOLING_OPERATOR_DESC
direct3d12\dml_max_pooling_operator_desc.htm
directml
DC500008-619C-425F-A2C4-DE17B984E4F7
01/19/2022
DML_MAX_POOLING_OPERATOR_DESC, DML_MAX_POOLING_OPERATOR_DESC structure, direct3d12.dml_max_pooling_operator_desc, directml/DML_MAX_POOLING_OPERATOR_DESC
directml.h
Windows
Windows
19H1
DML_MAX_POOLING_OPERATOR_DESC
directml/DML_MAX_POOLING_OPERATOR_DESC
c++
APIRef
kbSyntax
HeaderDef
DirectML.h
DML_MAX_POOLING_OPERATOR_DESC

-description

Computes the maximum value across the elements within the sliding window over the input tensor.

-struct-fields

-field InputTensor

Type: const DML_TENSOR_DESC*

An input tensor of Sizes { BatchCount, ChannelCount, Height, Width } if InputTensor.DimensionCount is 4, and { BatchCount, ChannelCount, Depth, Height, Weight } if InputTensor.DimensionCount is 5.

-field OutputTensor

Type: const DML_TENSOR_DESC*

An output tensor to write the results to. The sizes of the output tensor can be computed as follows.

OutputTensor->Sizes[0] = InputTensor->Sizes[0];
OutputTensor->Sizes[1] = InputTensor->Sizes[1];

for (UINT i = 0; i < DimensionCount; ++i) {
  UINT PaddedSize = InputTensor->Sizes[i + 2] + StartPadding[i] + EndPadding[i];
  OutputTensor->Sizes[i + 2] = (PaddedSize - WindowSizes[i]) / Strides[i] + 1;
}

-field DimensionCount

Type: UINT

The number of spatial dimensions of the input tensor InputTensor, which also corresponds to the number of dimensions of the sliding window WindowSize. This value also determines the size of the Strides, StartPadding, and EndPadding arrays. It should be set to 2 when InputTensor is 4D, and 3 when it's a 5D tensor.

-field Strides

Type: const UINT*

The strides for the sliding window dimensions of sizes { Height, Width } when the DimensionCount is set to 2, or { Depth, Height, Width } when set to 3.

-field WindowSize

Type: _Field_size_(DimensionCount) const UINT*

The dimensions of the sliding window in { Height, Width } when DimensionCount is set to 2, or { Depth, Height, Width } when set to 3.

-field StartPadding

Type: _Field_size_(DimensionCount) const UINT*

The number of padding elements to be applied to the beginning of each spatial dimension of the input tensor InputTensor. The values are in { Height, Width } when DimensionCount is set to 2, or { Depth, Height, Width } when set to 3.

-field EndPadding

Type: _Field_size_(DimensionCount) const UINT*

The number of padding elements to be applied to the end of each spatial dimension of the input tensor InputTensor. The values are in { Height, Width } when DimensionCount is set to 2, or { Depth, Height, Width } when set to 3.

-remarks

A newer version of this operator, DML_MAX_POOLING1_OPERATOR_DESC, was introduced in DML_FEATURE_LEVEL_2_0.

Availability

This operator was introduced in DML_FEATURE_LEVEL_1_0.

Tensor constraints

InputTensor and OutputTensor must have the same DataType and DimensionCount.

Tensor support

DML_FEATURE_LEVEL_5_0 and above

Tensor Kind Supported dimension counts Supported data types
InputTensor Input 4 to 5 FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8
OutputTensor Output 4 to 5 FLOAT32, FLOAT16, INT64, INT32, INT16, INT8, UINT64, UINT32, UINT16, UINT8

DML_FEATURE_LEVEL_3_0 and above

Tensor Kind Supported dimension counts Supported data types
InputTensor Input 4 to 5 FLOAT32, FLOAT16, INT8, UINT8
OutputTensor Output 4 to 5 FLOAT32, FLOAT16, INT8, UINT8

DML_FEATURE_LEVEL_1_0 and above

Tensor Kind Supported dimension counts Supported data types
InputTensor Input 4 to 5 FLOAT32, FLOAT16
OutputTensor Output 4 to 5 FLOAT32, FLOAT16