Creates a dense (fully connected) layer.
This layer implements the operation: output = activation(dot(input, kernel) + bias)
output = activation(dot(input, kernel) + bias)
activation is the element-wise activation function passed as the activation argument.
activation
kernel is a weights matrix created by the layer.
kernel
bias is a bias vector created by the layer (only applicable if useBias is true).
bias
useBias
true
Input shape:
nD tf.Tensor with shape: (batchSize, ..., inputDim).
tf.Tensor
(batchSize, ..., inputDim)
The most common situation would be a 2D input with shape (batchSize, inputDim).
(batchSize, inputDim)
Output shape:
nD tensor with shape: (batchSize, ..., units).
(batchSize, ..., units)
For instance, for a 2D input with shape (batchSize, inputDim), the output would have shape (batchSize, units).
(batchSize, units)
Note: if the input to the layer has a rank greater than 2, then it is flattened prior to the initial dot product with the kernel.
Generated using TypeDoc
Creates a dense (fully connected) layer.
This layer implements the operation:
output = activation(dot(input, kernel) + bias)
activation
is the element-wise activation function passed as theactivation
argument.kernel
is a weights matrix created by the layer.bias
is a bias vector created by the layer (only applicable ifuseBias
istrue
).Input shape:
nD
tf.Tensor
with shape:(batchSize, ..., inputDim)
.The most common situation would be a 2D input with shape
(batchSize, inputDim)
.Output shape:
nD tensor with shape:
(batchSize, ..., units)
.For instance, for a 2D input with shape
(batchSize, inputDim)
, the output would have shape(batchSize, units)
.Note: if the input to the layer has a rank greater than 2, then it is flattened prior to the initial dot product with the kernel.