softmax¶
- mlpractice.linear_classifier.softmax(predictions)¶
Computes probabilities of belonging to each of the classes from scores.
- Parameters
- predictionsnp.ndarray, shape(n_classes) or shape(batch_size, n_classes)
Classifier output.
- Returns
- probsnp.ndarray
Array with probabilities of belonging to each of the classes, with the same shape as predictions.