webml-polyfill
webml-polyfill copied to clipboard
[API] Propose to support LeakyRelu operation
Computes rectified linear activation on the input tensor element-wise. This is a custom op that can be achieved with max and mul
- The output is calculated using this formula:
output = max(mul(alpha, input),input) - Inputs:
-
- 0: A tensor, specifying the input.
-
- 1: An INT 32 Value , specifying the scaling factor for negative values(provided alpha <= 1).
- Outputs:
-
- 0: The output tensor of same shape as input0.
| Model Format | API reference |
|---|---|
| Tensorflow.lite | https://www.tensorflow.org/lite/guide/ops_compatibility LEAKY_RELU |
| ONNX | https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu |
| OpenVINO | https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_IR_V10_opset1.html#Maximum https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_IR_V10_opset1.html#Multiply |
| backend | support |
|---|---|
| WASM | Yes |
| WebGL | Yes |
| NNAPI | |
| MPS | |
| BNNS | |
| clDNN | |
| MKLDNN | |
| DirectML | |
| IE-clDNN | |
| IE-MKLDNN |