Tilting the playing field: Dynamical loss functions for machine learning