Skip to content

Latest commit

 

History

History
103 lines (82 loc) · 2.69 KB

ns-directml-dml_activation_swish_operator_desc.md

File metadata and controls

103 lines (82 loc) · 2.69 KB
UID title description ms.topic tech.root ms.date 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 f1_keywords dev_langs topic_type api_type api_location api_name
NS:directml.DML_ACTIVATION_SWISH_OPERATOR_DESC
DML_ACTIVATION_SWISH_OPERATOR_DESC structure
Performs a swish activation function on every element in *InputTensor*, placing the result into the corresponding element of *OutputTensor*.
reference
directml
01/05/2024
directml.h
Windows
Windows
DML_ACTIVATION_SWISH_OPERATOR_DESC
directml/DML_ACTIVATION_SWISH_OPERATOR_DESC
c++
APIRef
kbSyntax
HeaderDef
DirectML.h
DML_ACTIVATION_SWISH_OPERATOR_DESC

DML_ACTIVATION_SWISH_OPERATOR_DESC structure (directml.h)

Performs a swish activation function on every element in InputTensor, placing the result into the corresponding element of OutputTensor.

f(x) = x * Sigmoid(SigmoidInputScale * x)

This operator supports in-place execution, meaning that the output tensor is permitted to alias InputTensor during binding.

Important

This API is available as part of the DirectML standalone redistributable package (see Microsoft.AI.DirectML version 1.13 and later. Also see DirectML version history.

Syntax

struct DML_ACTIVATION_SWISH_OPERATOR_DESC
{
    const DML_TENSOR_DESC* InputTensor;
    const DML_TENSOR_DESC* OutputTensor;
    FLOAT SigmoidInputScale;
};

Members

InputTensor

Type: const DML_TENSOR_DESC*

The input tensor to read from.

OutputTensor

Type: const DML_TENSOR_DESC*

The output tensor to write the results to.

SigmoidInputScale

Type: FLOAT

The constant coefficient. A typical default for this value is 1.0.

Availability

This operator was introduced in DML_FEATURE_LEVEL_6_2.

Tensor constraints

InputTensor and OutputTensor must have the same DataType, DimensionCount, and Sizes.

Tensor support

Tensor Kind Supported dimension counts Supported data types
InputTensor Input 1 to 8 FLOAT32, FLOAT16
OutputTensor Output 1 to 8 FLOAT32, FLOAT16

Requirements

   
Header directml.h