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
Built Distribution
File details
Details for the file focal_loss_torch-0.0.7.tar.gz
.
File metadata
- Download URL: focal_loss_torch-0.0.7.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0048f78933be99f1f45e56bb31376f53989d91802649772ea20889e277c15998 |
|
MD5 | bc907b2661f49cae745048b86e001e9d |
|
BLAKE2b-256 | 0821f62ac5dd24060625d77c6c7a3869270e33d71cc2f7035395f30cae55d3f4 |
File details
Details for the file focal_loss_torch-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: focal_loss_torch-0.0.7-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38a8644822a46fc177e97c88f0ab3afa2c39c5a1cb157d6e7fd4ff4dfcb22897 |
|
MD5 | b0e23e867942e23fc80deab5892e6d8c |
|
BLAKE2b-256 | fcacbbcef8644d4e35eb80801f1bb19121e9cc90037c4edfddfd2c2b5fc4c2a6 |