Includes support for all loss-based and gradient-based methods as well as PolyLoss MaskBCE implementation