import tensorflow as tf

    >>> y = tf.nn.relu(tf.matmul(inputs, W) + b)

    Notes
    -----
    If the layer input has more than two axes, it needs to be flatten by using :class:`FlattenLayer`.

    """

    @deprecated_alias(layer='prev_layer', end_support_version=1.9)  # TODO remove this line for the 1.9 release
    def __init__(
            self,
            prev_layer,
            n_units=100,
            act=tf.identity,
            W_init=tf.truncated_normal_initializer(stddev=0.1),
            b_init=tf.constant_initializer(value=0.0),
            W_init_args=None,
            b_init_args=None,
            name='dense',
    ):

        super(DenseLayer, self).__init__(prev_layer=prev_layer, name=name)
        logging.info("DenseLayer  %s: %d %s" % (name, n_units, act.__name__))

        self.inputs = prev_layer.outputs
        self.n_units = n_units

        if W_init_args is None:
            W_init_args = {}
        if b_init_args is None:
