Skip to content

Commit 89f1314

Browse files
Merge pull request #4 from intsystems/docs
Docs
2 parents c05bb1e + a2c31bc commit 89f1314

File tree

4 files changed

+68
-2
lines changed

4 files changed

+68
-2
lines changed

README.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Implicit Reparametrization Trick
2+
==========
3+
4+
|test| |codecov| |docs|
5+
6+
.. |test| image:: https://github.com/intsystems/ProjectTemplate/workflows/test/badge.svg
7+
:target: https://github.com/intsystems/ProjectTemplate/tree/master
8+
:alt: Test status
9+
10+
.. |codecov| image:: https://img.shields.io/codecov/c/github/intsystems/ProjectTemplate/master
11+
:target: https://app.codecov.io/gh/intsystems/ProjectTemplate
12+
:alt: Test coverage
13+
14+
.. |docs| image:: https://github.com/intsystems/ProjectTemplate/workflows/docs/badge.svg
15+
:target: https://intsystems.github.io/implicit-reparameterization-trick/
16+
:alt: Docs status
17+
18+
Description
19+
==========
20+
21+
This repository implements an educational project for the Bayesian Multimodeling course. It implements algorithms for sampling from various distributions, using the implicit reparameterization trick.
22+
23+
Scope
24+
==========
25+
26+
We plan to implement the following distributions in our library:
27+
28+
- `Gaussian normal distribution`
29+
- `Dirichlet distribution (Beta distributions)`
30+
- `Sampling from a mixture of distributions`
31+
- `Sampling from the Student's t-distribution`
32+
- `Sampling from an arbitrary factorized distribution`
33+
34+
Stack
35+
==========
36+
37+
We plan to inherit from the torch.distribution.Distribution class, so we need to implement all the methods that are present in that class.
38+
39+
Usage
40+
==========
41+
42+
In this example, we demonstrate the application of our library using a Variational Autoencoder (VAE) model, where the latent layer is modified by a normal distribution.::
43+
44+
import torch.distributions.implicit as irt
45+
params = Encoder(inputs)
46+
gauss = irt.Normal(*params)
47+
deviated = gauss.rsample()
48+
outputs = Decoder(deviated)
49+
50+
In this example, we demonstrate the use of a mixture of distributions using our library.::
51+
52+
import irt
53+
params = Encoder(inputs)
54+
mix = irt.Mixture([irt.Normal(*params), irt.Dirichlet(*params)])
55+
deviated = mix.rsample()
56+
outputs = Decoder(deviated)
57+
58+
Links
59+
==========
60+
61+
- `LinkReview <https://github.com/intsystems/implitic-reparametrization-trick/blob/main/linkreview.md>`_
62+
- `Plan of project <https://github.com/intsystems/implitic-reparametrization-trick/blob/main/planning.md>`_

doc/source/info.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.. include:: ../../README.md
1+
.. include:: ../../README.rst

doc/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.. include:: ../../src/README.md
1+
.. include:: ../../src/README.rst

src/README.md renamed to src/README.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ Installing by using PyPi
1313

1414
Install
1515
-------
16+
.. code-block:: bash
17+
1618
git clone https://github.com/Intelligent-Systems-Phystech/implicit-reparameterization-trick.git /tmp/implicit-reparameterization-trick
1719
python3 -m pip install /tmp/implicit-reparameterization-trick/src/
1820
1921
Uninstall
2022
---------
23+
.. code-block:: bash
24+
2125
python3 -m pip uninstall irt

0 commit comments

Comments
 (0)