|
| 1 | +.. SPDX-FileCopyrightText: 2020-2023 Intel Corporation |
| 2 | +.. |
| 3 | +.. SPDX-License-Identifier: CC-BY-4.0 |
| 4 | +
|
| 5 | +.. include:: ../../replacements.inc.rst |
| 6 | + |
| 7 | +HardSigmoidBackward |
| 8 | +################### |
| 9 | + |
| 10 | +HardSigmoidBackward operation computes gradient for HardSigmoid. The formula is |
| 11 | +defined as follows: |
| 12 | + |
| 13 | +.. math:: |
| 14 | +
|
| 15 | + \diffsrc = \begin{cases} \diffdst \cdot \alpha & \text{if}\ 0 < \alpha \src + \beta < 1 \\ 0 & \text{otherwise}\ \end{cases} |
| 16 | +
|
| 17 | +Operation Attributes |
| 18 | +******************** |
| 19 | + |
| 20 | ++--------------+----------------+------------+--------------+-------------+ |
| 21 | +| Attribute | Description | Value Type | Supported | Required or | |
| 22 | +| Name | | | Values | Optional | |
| 23 | ++==============+================+============+==============+=============+ |
| 24 | +| |attr_alpha| | :math:`\alpha` | f32 | Arbitrary | Required | |
| 25 | +| | in the | | f32 value | | |
| 26 | +| | formula. | | | | |
| 27 | ++--------------+----------------+------------+--------------+-------------+ |
| 28 | +| |attr_beta| | :math:`\beta` | f32 | Arbitrary | Required | |
| 29 | +| | in the | | f32 value | | |
| 30 | +| | formula. | | | | |
| 31 | ++--------------+----------------+------------+--------------+-------------+ |
| 32 | + |
| 33 | + |
| 34 | +Execution Arguments |
| 35 | +******************* |
| 36 | + |
| 37 | +The inputs and outputs must be provided according to the below index order |
| 38 | +when constructing an operation. |
| 39 | + |
| 40 | +Inputs |
| 41 | +====== |
| 42 | + |
| 43 | + |
| 44 | +===== ============= ==================== |
| 45 | +Index Argument Name Required or Optional |
| 46 | +===== ============= ==================== |
| 47 | +0 ``src`` Required |
| 48 | +1 ``diff_dst`` Required |
| 49 | +===== ============= ==================== |
| 50 | + |
| 51 | +Outputs |
| 52 | +======= |
| 53 | + |
| 54 | + |
| 55 | +===== ============= ==================== |
| 56 | +Index Argument Name Required or Optional |
| 57 | +===== ============= ==================== |
| 58 | +0 ``diff_src`` Required |
| 59 | +===== ============= ==================== |
| 60 | + |
| 61 | + |
| 62 | +Supported Data Types |
| 63 | +******************** |
| 64 | + |
| 65 | +HardSigmoidBackward operation supports the following data type combinations. |
| 66 | + |
| 67 | +======== ======== ========= |
| 68 | +Src Diff_dst Diff_src |
| 69 | +======== ======== ========= |
| 70 | +f32 f32 f32 |
| 71 | +f16 f16 f16 |
| 72 | +bf16 bf16 bf16 |
| 73 | +======== ======== ========= |
0 commit comments