Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
“l-omar-chehab“ committed May 22, 2023
1 parent 00bf103 commit 06b7069
Show file tree
Hide file tree
Showing 50 changed files with 4,701 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,66 @@
# annealed-nce-submission
# annealed-nce

This repository is dedicated to methods that estimate the normalization of a target distribution,
by contrasting with a proposal distribution.

### Users

First create an environment for this project by running

```bash
# Create and activate an environment
conda env create -f environment.yml
conda activate annealed-nce
```

Then, install the package

```bash
# Install the package
python setup.py develop
```

<!--
### Contributors
First create an environment for this project by running
```bash
# Create and activate an environment
conda env create -f environment.yml
conda activate annealed-nce
```
Then, install the package, using the editable mode
```bash
# Install the package with editable mode
pip install -e .
```
And use test-driven development to make sure the edits you make do not break unitary tests
```bash
# Run pytest on all files starting with 'test_'
pytest annealednce --cov-report term-missing -v
```
-->

### Run an example

```bash
# Run annealed NCE on different statistical models
ipython -i experiments/run_experiments.py # interactive mode for debugging when breaks
```


<!--
```bash
# Visualize metrics (during or after the experiment)
tensorboard --logdir results
```
-->

### Reference

If you use this code in your project, please cite the following bibtex [to do].
Binary file added __pycache__/distributions.cpython-39.pyc
Binary file not shown.
Binary file added __pycache__/glow_model.cpython-39.pyc
Binary file not shown.
Binary file added __pycache__/glow_sandbox.cpython-39.pyc
Binary file not shown.
Binary file added annealednce/.DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions annealednce/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import torch

# we can change to torch.float64 for greater numerical precision
torch.set_default_dtype(torch.float32)
Binary file added annealednce/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added annealednce/__pycache__/defaults.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added annealednce/__pycache__/nce.cpython-310.pyc
Binary file not shown.
Binary file added annealednce/__pycache__/utils.cpython-310.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions annealednce/defaults.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from pathlib import Path

# Create folders
ROOT_FOLDER = Path(__file__).parent.parent

RESULTS_FOLDER = ROOT_FOLDER / "results"
RESULTS_FOLDER.mkdir(exist_ok=True, parents=True)

IMAGE_FOLDER = ROOT_FOLDER / "images"
IMAGE_FOLDER.mkdir(exist_ok=True, parents=True)
Loading

0 comments on commit 06b7069

Please sign in to comment.