PRelu¶
PRelu - 16¶
Version¶
name: PRelu (GitHub)
domain:
mainsince_version:
16function:
Truesupport_level:
SupportType.COMMONshape inference:
True
This version of the operator has been available since version 16.
Summary¶
PRelu takes input data (Tensorf(x) = slope * x for x < 0,
f(x) = x for x >= 0., is applied to the data tensor elementwise.
This operator supports unidirectional broadcasting (tensor slope should be unidirectional broadcastable to input tensor X); for more details please check Broadcasting in ONNX.
Function Body¶
The function definition for this operator.
<
domain: "",
opset_import: ["" : 16]
>
PRelu (X, slope) => (Y)
{
Zero = Constant <value: tensor = float {0}> ()
ZeroCast = CastLike (Zero, X)
XLessThanZero = Less (X, ZeroCast)
SlopeMulX = Mul (slope, X)
Y = Where (XLessThanZero, SlopeMulX, X)
}
Inputs¶
X (heterogeneous) - T:
Input tensor
slope (heterogeneous) - T:
Slope tensor. The shape of slope can be smaller than first input X; if so, its shape must be unidirectional broadcastable to X
Outputs¶
Y (heterogeneous) - T:
Output tensor (same size as X)
Type Constraints¶
T in (
tensor(bfloat16),tensor(double),tensor(float),tensor(float16),tensor(int32),tensor(int64),tensor(uint32),tensor(uint64)):Constrain input and output types to float/int tensors.
PRelu - 9¶
Version¶
name: PRelu (GitHub)
domain:
mainsince_version:
9function:
Falsesupport_level:
SupportType.COMMONshape inference:
True
This version of the operator has been available since version 9.
Summary¶
PRelu takes input data (Tensorf(x) = slope * x for x < 0,
f(x) = x for x >= 0., is applied to the data tensor elementwise.
This operator supports unidirectional broadcasting (tensor slope should be unidirectional broadcastable to input tensor X); for more details please check Broadcasting in ONNX.
Inputs¶
X (heterogeneous) - T:
Input tensor
slope (heterogeneous) - T:
Slope tensor. The shape of slope can be smaller than first input X; if so, its shape must be unidirectional broadcastable to X
Outputs¶
Y (heterogeneous) - T:
Output tensor (same size as X)
Type Constraints¶
T in (
tensor(double),tensor(float),tensor(float16),tensor(int32),tensor(int64),tensor(uint32),tensor(uint64)):Constrain input and output types to float/int tensors.
PRelu - 7¶
Version¶
name: PRelu (GitHub)
domain:
mainsince_version:
7function:
Falsesupport_level:
SupportType.COMMONshape inference:
True
This version of the operator has been available since version 7.
Summary¶
PRelu takes input data (Tensorf(x) = slope * x for x < 0,
f(x) = x for x >= 0., is applied to the data tensor elementwise.
This operator supports unidirectional broadcasting (tensor slope should be unidirectional broadcastable to input tensor X); for more details please check Broadcasting in ONNX.
Inputs¶
X (heterogeneous) - T:
Input tensor
slope (heterogeneous) - T:
Slope tensor. The shape of slope can be smaller than first input X; if so, its shape must be unidirectional broadcastable to X
Outputs¶
Y (heterogeneous) - T:
Output tensor (same size as X)
Type Constraints¶
T in (
tensor(double),tensor(float),tensor(float16)):Constrain input and output types to float tensors.
PRelu - 6¶
Version¶
name: PRelu (GitHub)
domain:
mainsince_version:
6function:
Falsesupport_level:
SupportType.COMMONshape inference:
True
This version of the operator has been available since version 6.
Summary¶
PRelu takes input data (Tensorf(x) = slope * x for x < 0,
f(x) = x for x >= 0., is applied to the data tensor elementwise.
Inputs¶
X (heterogeneous) - T:
Input tensor
slope (heterogeneous) - T:
Slope tensor. If
Slopeis of size 1, the value is sharedacross different channels
Outputs¶
Y (heterogeneous) - T:
Output tensor
Type Constraints¶
T in (
tensor(double),tensor(float),tensor(float16)):Constrain input and output types to float tensors.
PRelu - 1¶
Version¶
name: PRelu (GitHub)
domain:
mainsince_version:
1function:
Falsesupport_level:
SupportType.COMMONshape inference:
False
This version of the operator has been available since version 1.
Summary¶
PRelu takes input data (Tensorf(x) = slope * x for x < 0,
f(x) = x for x >= 0., is applied to the data tensor elementwise.
Attributes¶
consumed_inputs - INTS :
legacy optimization attribute.
Inputs¶
X (heterogeneous) - T:
Input tensor
slope (heterogeneous) - T:
Slope tensor. If
Slopeis of size 1, the value is sharedacross different channels
Outputs¶
Y (heterogeneous) - T:
Output tensor
Type Constraints¶
T in (
tensor(double),tensor(float),tensor(float16)):Constrain input and output types to float tensors.