While creating a model for text classification, what is the need for a Dense Layer? I noticed in multiple examples the following is the structure. A softmax is what required right instead of the Dense Layer?
model = tf.keras.Sequential([ tf.keras.layers.Embedding(encoder.vocab_size, 64), tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(64)), tf.keras.layers.Dense(1) ])
Consider the following sentence in 5 class classification:
"movie is good" . The model structure could be:
a = activation_unit emb= embedding_vector(word) a0 -> emb("movie") ->a1->emb("is") ->a2->emb("good") ->a3, and sample_y = softmax(np.dot(Wya,a3)) and sample_y = [0.1,0.2,0.2,0.4,0.1]
which says the sentence belongs to "class 4". So where is the need for a "Dense Layer"? Can anyone please explain this