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.1.tar.gz
(13.8 kB
view hashes)
Built Distribution
Close
Hashes for torchlikelihoods-0.0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b411c3a0a84378cd673a612207fcbd0bd0682b17f02ee3e1629a9bbcfc6e5b51 |
|
MD5 | cd9ef0c416ba934ec14cd2b1fdb657a5 |
|
BLAKE2b-256 | 1dee91c4a2a217b620bb1ab80dedbe6a389b5dc8c8373126b5d5f432c43c1e63 |