This class implements a fully connected layer. The layer multiplies each of the input vectors by the weight matrix and adds the free term vector to the result.
void SetNumberOfElements(int newNumberOfElements);
Sets the length of each vector in the output.
void SetZeroFreeTerm(bool isZeroFreeTerm);
Specifies if the free terms should be used. If you set this value to true
, the free terms vector will be set to all zeros and won't be trained. By default, this value is set to false
.
CPtr<CDnnBlob> GetWeightsData() const;
The weight matrix is a blob of the dimensions:
BatchLength * BatchWidth * ListSize
is equal toGetNumberOfElements()
Height
,Width
,Depth
, andChannels
are equal to the same dimensions of the first input
CPtr<CDnnBlob> GetFreeTermData() const;
The free terms are represented by a blob of the total size equal to GetNumberOfElements()
.
Each input accepts a blob with a set of vectors, of the dimensions:
BatchLength * BatchWidth * ListSize
is the number of vectors in the set.Height * Width * Depth * Channels
is each vector length. It should be the same for all inputs.
For each input, the corresponding output contains a blob with the result, of the dimensions:
BatchLength
is equal to the inputBatchLength
BatchWidth
is equal to the inputBatchWidth
ListSize
is equal to the inputListSize
Height
,Width
, andDepth
are equal to1
Channels
is equal toGetNumberOfElements()