Skip to main content

Package with losses for distribution learning

Project description

PyPI version Build Status PyPI license

Histogram Based Losses

This library contains implementations of some histogram-based loss functions:

  • Earth Mover Distrance Loss
  • Histgramm Loss (paper, original code)
  • Inverse Histogram Loss (our impovements)
  • Bidirectinal Histogramm Loss (our impovements)
  • Continuous Histogram Loss (paper)

Also there are implementations of another losses to compare:

  • Negative Log-Likelihood
  • Binomial Deviance loss (paper)

Installation

Installation from source

The instalation directly from this repository:

https://github.com/stat-ml/hist-loss.git
cd histloss
python setup.py install

Pip Installation

pip install hist-loss

Example of usage

criterion = HistogramLoss()
positive = torch.sigmoid(torch.randn(10, requires_grad=True))
negative = torch.sigmoid(torch.randn(10, requires_grad=True))
loss = criterion(positive, negative)
loss.backward()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hist-loss-0.0.10.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file hist-loss-0.0.10.tar.gz.

File metadata

  • Download URL: hist-loss-0.0.10.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.3

File hashes

Hashes for hist-loss-0.0.10.tar.gz
Algorithm Hash digest
SHA256 17e979fd952c37e3de02c22e4ef565e981b400945517cddfeafafaf79af661de
MD5 ddb1d9714bd1b011827ba4d0409f474a
BLAKE2b-256 99c0ba38f7cfc86cf02513a8cf226a349071b59550e1e1fd435b22e6f44ed865

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page