This class implements a GRU layer that works with a set of vector sequences.
The result is a vector sequence of the same length, with each vector the length of GetHiddenSize()
.
CPtr<CDnnBlob> GetGateWeightsData() const;
The gate weights are put into a two-dimensional matrix represented by a blob of the dimensions:
BatchLength * BatchWidth * ListSize
is equal to2 * GetHiddenSize()
Height * Width * Depth * Channels
is equal to the same dimension of the input plusGetHiddenSize()
.
Along the BatchLength * BatchWidth * ListSize
axis the gate weights are sorted in the following order:
G_Update = 0, // Update gate
G_Reset, // Reset gate
Along the Height * Width * Depth * Channels
axis the weights are put into following order:
- from the start to the input
Height * Width * Depth * Channels
the weights for the input vectors - the rest
GetHiddenSize()
coordinates correspond to the weights for the previous step result.
CPtr<CDnnBlob> GetGateFreeTermData() const;
The free terms for the gates are represented by a blob of 2 * GetHiddenSize()
total size.
CPtr<CDnnBlob> GetMainWeightsData() const;
The output weights are put into a two-dimensional matrix represented by a blob of the dimensions:
BatchLength * BatchWidth * ListSize
is equal toGetHiddenSize()
Height * Width * Depth * Channels
is equal to the same dimension fo the input plusGetHiddenSize()
The free terms for the output are represented by a blob of GetHiddenSize()
total size.
The layer has 1 to 2 inputs:
- The set of vector sequences.
- [Optional] The initial previous step result that should be used on the first step. If you do not connect this input all zeros will be used.
The single output returns a blob of the dimensions:
BatchLength
,BatchWidth
, andListSize
equal the corresponding input dimensionsHeight
,Width
, andDepth
are equal to1
Channels
equalsGetHiddenSize()