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.1.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for torchlikelihoods-0.0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bfabc298f4e35acb9e1a6663308e7fb97911e6faea4131585eb927c2f58a006 |
|
MD5 | 8789f96bd920580f1fd016d596ba7920 |
|
BLAKE2b-256 | d44b5e4d4ccea1a0bd2774cc04849038b519d43caccf347a874192fc91b90c00 |