Recurrent and Fully Connected Kernels Group¶
This group describes operations related to the RNN calculations and includes general fully connected kernel description. There are a lot of variations of RNN Cells architectures. MLI provides the most popular ones as a separate kernel. The RNN Dense kernel in combination with elementwise and transform kernels might be used to construct Recurrent cells which are not present in MLI.
Functions in this group typically use the mli_rnn_cell_cfg
structure, defined as:
typedef struct {
mli_rnn_direction direction;
mli_rnn_results results;
mli_rnn_out_activation act;
mli_data_container scratch_data;
} mli_rnn_cell_cfg;
Field Name |
Type |
Enumeration Value |
Description |
---|---|---|---|
|
(enumeration) |
|
Process the input sequence in forward direction (from the first entity to the last one). |
|
Process the input sequence in backward direction (from the last entity to the first one). |
||
|
(enumeration) |
|
Preserve only the last result after all RNN iterations in output tensor |
|
Preserve result of each RNN iteration in output tensor |
||
|
|
|
Hyperbolic tangent activation function |
|
Logistic (sigmoid) activation function |
||
|
No activation |
||
|
|
– |
Container with a scratch memory to keep cell’s intermediate results.
Must contain a valid pointer in |