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
Create source distribution
python setup.py sdist
tar tzf dist/torchlikelihoods-0.0.1.tar.gz
To include all the source code
pip install check-manifest
check-manifest --create
Publish it!
python setup.py bdist_wheel sdist
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
Built Distribution
File details
Details for the file torchlikelihoods-0.0.1.tar.gz
.
File metadata
- Download URL: torchlikelihoods-0.0.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89dfd93ee3a36122d26e517fa497a2738e23cbc849ef2082fa0b40e55ae43f14 |
|
MD5 | ca6248e244e2ea2469c68ebc0126cce3 |
|
BLAKE2b-256 | 64b5b4b4a9ffcd5e842cf0c3eaf62c941782a41ce6d248740aaffb59e1a53b8d |
File details
Details for the file torchlikelihoods-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: torchlikelihoods-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 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 | edb69e69e13a240d32f325b2e498b26d98712b0685490b1b8c2eaf44c0400e01 |
|
MD5 | 09d4f3bdd60e5791ebab0f1eb7b2af31 |
|
BLAKE2b-256 | 3532c91cde811737ccd2a35201f9b78a2b64da4b783c0dcbb2afd5b35715aeed |