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 = 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.3.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for torchlikelihoods-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5bc931a31bc3e793a9b324334d64a66a773caa0d2764a927efee44eddced41c |
|
MD5 | 82f87284f90ba702cc6cd4e23ede146e |
|
BLAKE2b-256 | c965ce0dd08e2667a4bf7059736d91a1bdcd5eabb82d649a7917404915e278f1 |