Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bes-dev/mpl.pytorch
Pytorch implementation of MaxPoolingLoss.
https://github.com/bes-dev/mpl.pytorch
Last synced: about 2 months ago
JSON representation
Pytorch implementation of MaxPoolingLoss.
- Host: GitHub
- URL: https://github.com/bes-dev/mpl.pytorch
- Owner: bes-dev
- License: bsd-3-clause
- Created: 2018-04-20T22:04:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-09T12:04:20.000Z (over 6 years ago)
- Last Synced: 2024-05-23T06:48:17.986Z (8 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 175
- Watchers: 6
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-pytorch-list-CNVersion - mpl.pytorch
README
# Max-Pooling Loss
[**Loss Max-Pooling for Semantic Image Segmentation**](https://arxiv.org/abs/1704.02966)
## 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:
```bash
cd mpl
python build.py
```## Using
```python
import mpl
import torchmax_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)
```