NAME
softmin -- unit to compute softmin function of inputs
softmax -- unit to compute softmax function of inputs
PROTOTYPES
unitptr softmin( int iDim, float fBeta, unitptr uHost)
unitptr softmax( int iDim, float fBeta, unitptr uHost)
ARGUMENTS
- int iDim
- dimension of input vector dimension of input vector
- float fBeta
- initial value for beta initial value for beta
- unitptr uHost
- host unit host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[Dim]:
- input vector with Dim=|iDim| elements, packed for iDim<0
- Y_in[1]:
- beta parameter for softmax computation [0 finds maximum]
(initialized with fBeta)
- CTL_in[1]:
- (control field) a value of 0 switches this unit off.
- X_out[Dim]:
- output vector with Dim=|iDim| elements, packed for iDim<0
EXECUTION OF CREATED UNIT:
This unit computes a softmax (softmin) - function X_out[i] for all elements
X_in[0..Dim-1] of its input vector:
X_out[i] = exp(beta*X_in[i])/Z (for softmax)
X_out[i] = exp(-beta*X_in[i])/Z (for softmin)
where
Z = sum_i exp(beta*X_in[i]) (for softmax)
Z = sum_i exp(-beta*X_in[i]) (for softmin)
If CTL_in[0] = 0, no computations are made and the output values
remain unchanged.
STATUS:
soft_max beta, soft_min not yet released.
FILE
/local/homes/rhaschke/nst7/man/../o.linx86_64//../foldersrc/nst_funct.c