Uncertainty- and hardness-weighted loss functions for medical image segmentation The PyTorch implementation will be available once the paper is accepted.