Skip to content

Commit 8e220cb

Browse files
committed
Working on text2image example
1 parent c12d4c2 commit 8e220cb

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

config/generative_config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
files:
2+
- "train-00000-of-00645-b66ac786bf6fb553.parquet"
3+
mlp:
4+
layer_type: "polynomial"
5+
n: 3
6+
n_in: null
7+
n_out: null
8+
n_hidden: null
9+
periodicity: null
10+
rescale_output: False
11+
scale: 2.0
12+
input:
13+
segments: 1
14+
width: 2
15+
output:
16+
segments: 1
17+
width: 3
18+
hidden:
19+
segments: 1
20+
layers: 2
21+
width: 10
22+
23+
max_epochs: 50
24+
gpus: 1
25+
accelerator : cuda
26+
lr: 1e-3
27+
batch_size: 256
28+
29+
# Are you training? Otherwise plot the result
30+
train: True
31+
checkpoint: null
32+
rotations: 1 # 1 is x,y, 2 is x,y, x-y, x+y, greater includes additional rotations
33+
34+
defaults:
35+
- optimizer: sparse_lion

examples/text_to_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
logging.getLogger().setLevel(logging.DEBUG)
2121

2222

23-
@hydra.main(config_path="../config", config_name="images_config")
23+
@hydra.main(config_path="../config", config_name="generative_config")
2424
def run_implicit_images(cfg: DictConfig):
2525

2626
logger.info(OmegaConf.to_yaml(cfg))
@@ -30,7 +30,7 @@ def run_implicit_images(cfg: DictConfig):
3030
root_dir = hydra.utils.get_original_cwd()
3131

3232
if cfg.train is True:
33-
full_path = [f"{root_dir}/{path}" for path in cfg.images]
33+
full_path = [f"{root_dir}/{path}" for path in cfg.files]
3434
data_module = Text2ImageDataModule(
3535
filenames=full_path, batch_size=cfg.batch_size, rotations=cfg.rotations
3636
)

0 commit comments

Comments
 (0)