TorchLikelihoods: User-friendly handling of likelihoods in Pytorch
Project description
TorchLikelihoods
A library for handling likelihoods in PyTorch for any type of data
Installation
Run the following to install
pip install torchlikelihoods
Usage
from torchlikelihoods import NormalLikelihood
import torch
num_samples, num_feats = 100, 5
normal_data = torch.randn((num_samples, num_feats))
lik = NormalLikelihood(domain_size=num_feats)
scaler = lik.get_scaler()
print(f"Domain size: {lik.domain_size()}")
print(f"Params size: {lik.params_size()}")
Do you want to get involved in the development?
pip install -e .[dev]
Testing
To run the tests:
make test
pytest
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
torchlikelihoods-0.0.5.2.tar.gz
(13.9 kB
view hashes)
Built Distribution
Close
Hashes for torchlikelihoods-0.0.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4906eddd8149aae222407df1d730c704d5f3014f1c875aa68c785e93de1e51 |
|
MD5 | a619cf3b0c1c8f55805e94c10b148123 |
|
BLAKE2b-256 | 78443c7e8e53a477c324b981926d33b200ef6d06741f51c6842710f22f898e5c |