127

GitHub - BelBES/mpl.pytorch: Pytorch implementation of MaxPoolingLoss.

 6 years ago
source link: https://github.com/BelBES/mpl.pytorch
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

Max-Pooling Loss

Loss Max-Pooling for Semantic Image Segmentation

Installation

Requirements

To install PyTorch, please refer to https://github.com/pytorch/pytorch#installation.

Compiling

Some parts of Max-Pooling Loss have a native C++ implementation, which must be compiled with the following commands:

cd mpl
python build.py

Using

import mpl
import torch

max_pooling_loss = mpl.MaxPoolingLoss(ratio=0.3, p=1.7, reduce=True)
loss = torch.Tensor(1, 3, 3, 3).uniform_(0, 1)
loss = max_pooling_loss(loss)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK