Is tf.layers.dense a single layer?

后端 未结 2 1098
囚心锁ツ
囚心锁ツ 2021-02-07 10:04

If I just use a single layer like this:

layer = tf.layers.dense(tf_x, 1, tf.nn.relu)

Is this just a single layer with a single node?

Or

2条回答
  •  我寻月下人不归
    2021-02-07 10:23

    tf.layers.dense (tf.compat.v1.layers.dense) is only one layer with a amount of nodes. You can check on TensorFlow web site about tf.layers.dense (tf.compat.v1.layers.dense)

    layer1 = tf.layers.dense(inputs=pool2_flat, units=1024, activation=tf.nn.relu)
    layer2 = tf.layers.dense(inputs=layer1, units=1024, activation=tf.nn.relu)
    

提交回复
热议问题