Some loss functions in Keras.
python setup.py install
from keras_losses import get_ranking_loss
ranking_loss = get_ranking_loss(gamma=2.0, mp=2.5, mn=0.5)
from keras_losses import get_weighted_categorical_crossentropy, get_weighted_sparse_categorical_crossentropy
weighted_loss = get_weighted_categorical_crossentropy(weights=[0.8, 0.1, 0.2, 0.3, 0.4])
weighted_loss = get_weighted_sparse_categorical_crossentropy(weights=[0.8, 0.1, 0.2, 0.3, 0.4])
from keras_losses import coral_loss