Skip to content

Commit

Permalink
[DOC] Describe how to reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
f-dangel committed Jul 4, 2024
1 parent 88941fc commit 110a0bb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
17 changes: 17 additions & 0 deletions experiments/visual_abstract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
To reproduce this experiment,

1. Run
```bash
python generate_data.py
```
You may have to set `skip_existing=False`, otherwise runs for which data already exists will be skipped.

2. Gather the results
```bash
python gather_data.py
```

3. Plot the results
```bash
python plot.py
```
11 changes: 5 additions & 6 deletions experiments/visual_abstract/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
from subprocess import CalledProcessError, run
from typing import List

from tqdm import tqdm

HERE = path.abspath(__file__)
HEREDIR = path.dirname(HERE)
SCRIPT = path.join(HEREDIR, "run.py")


max_num_layers = 10
requires_grads = ["all", "none", "4", "4+"]
implementations = ["torch", "ours"]
implementations = ["ours"]
architectures = ["linear", "conv1d", "conv2d", "conv3d", "bn"]
architectures = ["linear", "conv1d", "conv2d", "conv3d", "bn2d"]
modes = ["eval", "train"]
skip_existing = True

Expand All @@ -40,9 +40,8 @@ def _run(cmd: List[str]):


if __name__ == "__main__":
for implementation, requires_grad, architecture, mode in product(
implementations, requires_grads, architectures, modes
):
configs = list(product(implementations, requires_grads, architectures, modes))
for implementation, requires_grad, architecture, mode in tqdm(configs):
if implementation == "ours" and requires_grad != "4":
continue

Expand Down

0 comments on commit 110a0bb

Please sign in to comment.