Simple pytorch implementation of focal loss
Project description
focal_loss_torch
Simple pytorch implementation of focal loss introduced by Lin et al [1].
Usage
Install the package using pip
pip install focal_loss_torch
Focal loss is now accessible in your pytorch environment:
from focal_loss.focal_loss import FocalLoss
...
criterion = FocalLoss(alpha=2, gamma=5)
...
Contributions
Contributions, criticism or corrections are always welcome. Just send me a pull request!
References
[1] Lin, T. Y., et al. "Focal loss for dense object detection." arXiv 2017." arXiv preprint arXiv:1708.02002 (2002).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
focal_loss_torch-0.0.5.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for focal_loss_torch-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac3bd4976f9f2639699fc6b764e05bdd0261ac1aa808ad24ceb6b85e22a58c6 |
|
MD5 | e71d658c8dff0f789773097e4f6112a0 |
|
BLAKE2b-256 | 4e53eda79033c26e48ffda1f570a9d35d6647807f42bd4445f97836da7010121 |