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.6.2.tar.gz
(14.3 kB
view details)
Built Distribution
File details
Details for the file torchlikelihoods-0.0.6.2.tar.gz
.
File metadata
- Download URL: torchlikelihoods-0.0.6.2.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98658fe0da76a5f4e06b5e26e601efffde874830189e060559cd7f25dc9add83 |
|
MD5 | 8fb05066da300fcd6cbe20c9b4341b17 |
|
BLAKE2b-256 | c0fcbc26414c21792e068930d54cf60ae8965553c6b73b284775b3401c53271b |
File details
Details for the file torchlikelihoods-0.0.6.2-py3-none-any.whl
.
File metadata
- Download URL: torchlikelihoods-0.0.6.2-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf7353ac7373ea368396e89d4a32ac9e6bc1525e9fb58b80b9f8bced32e843e7 |
|
MD5 | 5c80533c3468543828a5eec2a5756420 |
|
BLAKE2b-256 | 4d28c75d4da22fd2d73385b1f22134450cc0532f41be9bf7c042946c53ca1c62 |