Error in C2_W2 Improved implementation of Softmax

Is there an error on slides? In " Improved implementation of softmax" , the logistic regression example code. The code in slide is Dense(10,‘linear’) , shouldn’t it be Dense(1,‘linear’) as output layer. As its a binary classifier.

Hello @_Syed !
This is correct as softmax is used for multiclass classification. Which is exactly the context of the video.
Using softmax, the number of neurons in the output layer will be equal to the number of labels (classes) in the data in hand. In the example it’s used 10 (Ten classes).
Hope this helps!

1 Like