pub struct IActivationLayer { /* private fields */ }Expand description
IActivationLayer
An Activation layer in a network definition.
This layer applies a per-element activation function to its input.
The output has the same shape as the input.
The input is a shape tensor if the output is a shape tensor.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IActivationLayer
impl IActivationLayer
Sourcepub fn setActivationType(
self: Pin<&mut IActivationLayer>,
type_: ActivationType,
)
pub fn setActivationType( self: Pin<&mut IActivationLayer>, type_: ActivationType, )
Set the type of activation to be performed.
On the DLA, the valid activation types are kRELU, kSIGMOID, kTANH, and kCLIP.
See [getActivationType()], ActivationType
Sourcepub fn getActivationType(self: &IActivationLayer) -> ActivationType
pub fn getActivationType(self: &IActivationLayer) -> ActivationType
Get the type of activation to be performed.
See [setActivationType()], ActivationType
Sourcepub fn setAlpha(self: Pin<&mut IActivationLayer>, alpha: f32)
pub fn setAlpha(self: Pin<&mut IActivationLayer>, alpha: f32)
Set the alpha parameter (must be finite).
This parameter is used by the following activations: LeakyRelu, Elu, Selu, Softplus, Clip, HardSigmoid, ScaledTanh, ThresholdedRelu.
It is ignored by the other activations.
See [getAlpha()], setBeta()
Sourcepub fn setBeta(self: Pin<&mut IActivationLayer>, beta: f32)
pub fn setBeta(self: Pin<&mut IActivationLayer>, beta: f32)
Set the beta parameter (must be finite).
This parameter is used by the following activations: Selu, Softplus, Clip, HardSigmoid, ScaledTanh.
It is ignored by the other activations.
See [getBeta()], setAlpha()
Sourcepub fn getAlpha(self: &IActivationLayer) -> f32
pub fn getAlpha(self: &IActivationLayer) -> f32
Get the alpha parameter.
See [getBeta()], setAlpha()
Sourcepub fn getBeta(self: &IActivationLayer) -> f32
pub fn getBeta(self: &IActivationLayer) -> f32
Get the beta parameter.
See [getAlpha()], setBeta()