Deep Learning, Machine Learning, Artificial Intelligence, Loss Function, Neural Networks.
and y_pred represents the predicted probabilities for each class, both as NumPy arrays. The loss is calculated using the formula described above, and then printed to the console using the print function. Note that the np.sum function is used twice to sum over both dimensions of the Y matrix.