This is the re-implemantation of Boundary Loss proposed in:
Alexey Bokhovkin, Evgeny Burnaev, "Boundary Loss for Remote Sensing Imagery Semantic Segmentation", https://arxiv.org/abs/1905.07852