tf.compat.v1.layers.dense

View source on GitHub

Functional interface for the densely-connected layer. (deprecated)

tf.compat.v1.layers.dense(
    inputs, units, activation=None, use_bias=True, kernel_initializer=None,
    bias_initializer=tf.zeros_initializer(), kernel_regularizer=None,
    bias_regularizer=None, activity_regularizer=None, kernel_constraint=None,
    bias_constraint=None, trainable=True, name=None, reuse=None
)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use keras.layers.Dense instead.

This layer implements the operation: outputs = activation(inputs * kernel + bias) where activation is the activation function passed as the activation argument (if not None), kernel is a weights matrix created by the layer, and bias is a bias vector created by the layer (only if use_bias is True).

Arguments:

Returns:

Output tensor the same shape as inputs except the last dimension is of size units.

Raises: