In this example, which activation function can be used to predict the probability of being person XYZ?
HI @Jinyan_Liu
In this example there are one neuron so that the probability of being person XYZ could be done using sigmoid activation function, if there are multiclassification(more than 2 labels) you can use softmax activation function
so if i have 2 names to predict, i should be using sigmoid as it gives a binary probability, but when i have , say 10 names to predict than i shall go for other activation functions like softmax. Right?
Right.
Ah I think I misunderstood the example. So before the prediction happens, the model has been trained on multiple of her images and others, with y_train to be 0 or 1.(speaking of this example)
So what I really want to ask is different : just by giving an image, to predict a name, and the model has been trained with a billion of different people’s images and names(so y_train has a billion of names). What would be the activation function to predict the probability of being XYZ? Would softmax work?
If it is a multiclass problem (having the information that you have a class XYZ) then softmax would give you this probability. If the goal is a similarity between two faces, then a linear activation.
Hello @Jinyan_Liu ,
Choice of activation function for this task depends on the specific requirements of the application.
Softmax function is a good choice for this task because it is able to handle a large number of classes.
So Softmax is preferable.
With regards,
Nilosree Sengupta
Thank you so much @Nydia and @nilosreesengupta ! In the course, the multi classes examples don’t have a large number of classes, that’s why I was wondering. Now I understand, thank you!