Welcome to our Support Center

Shrink

Description

Shrink takes one input data (Tensor) and produces one Tensor output, having same datatype and shape with input. It has two attributes, lambd and bias. The formula of this operator is: If x < -lambd, y = x + bias; If x > lambd, y = x – bias; Otherwise, y = 0.

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.
input (heterogeneous) – T : object, the input data as Tensor.

 Parameters : cluster,

bias : float, the bias value added to output. 
Default value “0”.
lambd : float, the lambd value for the Shrink formulation.
Default value “0,5”.
 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

output (heterogeneous) – T : object, the output.

Type Constraints

T in (tensor(double)tensor(float)tensor(float16)tensor(int16)tensor(int32)tensor(int64)tensor(int8)
tensor(uint16)tensor(uint32)tensor(uint64)tensor(uint8)) : Constrain input to only numeric types.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents