-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
“l-omar-chehab“
committed
May 22, 2023
1 parent
00bf103
commit 06b7069
Showing
50 changed files
with
4,701 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.