prelu#
- ivy.prelu(x, slope, /, *, out=None)[source]#
Prelu takes input data (Array) and slope array as input,
and produces one output data (array) where the function f(x) = slope * x for x < 0, f(x) = x for x >= 0., is applied to the data array elementwise. This operator supports unidirectional broadcasting (array slope should be unidirectional broadcastable to input tensor X);
- Parameters:
- Return type:
- Returns:
ret – Array containing Parametrized relu values.
- Array.prelu(self, slope, /, *, out=None)#
Prelu takes input data (Array) and slope array as input,
and produces one output data (array) where the function f(x) = slope * x for x < 0, f(x) = x for x >= 0., is applied to the data array elementwise. This operator supports unidirectional broadcasting (array slope should be unidirectional broadcastable to input tensor X);
- Parameters:
self – input array.
slope (
Union
[float
,NativeArray
,Array
]) – Slope Array. The shape of slope can be smaller than first input X; if so, its shape must be unidirectional broadcastable to X.out (
Optional
[Array
]) – Optional output array. (default:None
)
- Return type:
Array
- Returns:
ret – input array with prelu applied elementwise.
- Container.prelu(self, slope, *, key_chains=None, to_apply=True, prune_unapplied=False, map_sequences=False, out=None)#
- Parameters:
slope (
Union
[float
,NativeArray
,Array
,Container
]) –key_chains (
Optional
[Union
[List
[str
],Dict
[str
,str
]]]) – (default:None
)to_apply (
bool
) – (default:True
)prune_unapplied (
bool
) – (default:False
)map_sequences (
bool
) – (default:False
)out (
Optional
[Container
]) – (default:None
)
- Return type:
Container