educative.io

Educative

Decoder Object in Tensorflow

" Instead of using the tf.layers.dense function, we create a fully-connected layer object using the tf.layers.Dense constructor."

What is the difference between tf.layers.dense AND tf.layers.Dense?

Cannot seem to find it in the tf documentation…

Hi @Ovo_Okpubuluku,

tf.layers.Dense returns an instance of class Dense but tf.layers.dense first creates an instance of tf.layers.Dense, then calls return layer.apply(inputs), which returns a tensor.

Same goes for:

  • tf.layers.Dropout and tf.layers.dropout
  • tf.layers.Flatten and tf.layers.flatten
  • and others