kerasadf.layers.core.Dense¶
-
class
kerasadf.layers.core.Dense(units, activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None, **kwargs)¶ Bases:
kerasadf.layers.core.ADFLayerDensly-connected (fully connected) neural network layer.
Assumed Density Filtering (ADF) version of
keras.layers.Dense.- Parameters
- units
int Dimensionality of the output space (number of neurons).
- activation
callable()orstr, optional Activation function to use. Default is no activation (ie. “linear” activation:
a(x) = x).- use_biasbool
Whether the layer uses a bias vector.
- kernel_initializer
Initializerorstr, optional Initializer for the
kernelweights matrix. Default isglorot_uniforminitialization.- bias_initializer
Initializerorstr, optional Initializer for the bias vector. Default is
None.- kernel_regularizer
Regularizerorstr, optional Regularizer function applied to the
kernelweights matrix. Default isNone.- bias_regularizer
Regularizerorstr, optional Regularizer function applied to the bias vector. Default is
None.- activity_regularizer
Regularizerorstr, optional Regularizer function applied to the output of the layer. Default is
None.- kernel_constraint
Constraintorstr, optional Constraint function applied to the
kernelweights matrix. Default isNone.- bias_constraint
Constraintorstr, optional Constraint function applied to the bias vector. Default is
None.
- units
Notes
- Input shape
nD tensor with shape:
(batch_size, ..., input_dim). The most common situation would be a 2D input with shape(batch_size, input_dim).- Output shape
nD tensor with shape:
(batch_size, ..., units). For instance, for a 2D input with shape(batch_size, input_dim), the output would have shape(batch_size, units).
-
build(self, input_shape)¶
-
call(self, inputs)¶
-
compute_output_shape(self, input_shape)¶
-
get_config(self)¶