Compute and visualizing different loss functions