tf.compat.v1.layers.dense

Functional interface for the densely-connected layer.

Used in the notebooks

Used in the guide Used in the tutorials

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).

inputs Tensor input.
units Integer or Long, dimensionality of the output space.
activation Activation function (callable). Set it to None to maintain a linear activation.
use_bias Boolean, whether the layer uses a bias.
kernel_initializer Initializer function for the weight matrix. If None (default), weights are initialized using the default initializer used by tf.compat.v1.get_variable.
bias_initializer