Loss Max-Pooling for Semantic Image Segmentation
To install PyTorch, please refer to https://github.com/pytorch/pytorch#installation.
Some parts of Max-Pooling Loss have a native C++ implementation, which must be compiled with the following commands:
cd mpl
python build.py
import mpl
import torch
loss = torch.Tensor(1, 3, 3, 3).uniform_(0, 1)
weights = mpl.MaxPoolingLoss(loss)