Skip to content

Commit

Permalink
Add sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
Solor-pikachu committed Mar 15, 2024
1 parent c34e097 commit afbc59e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 524 deletions.
446 changes: 0 additions & 446 deletions nila_sampling/.ipynb_checkpoints/Recon-checkpoint.ipynb

This file was deleted.

75 changes: 0 additions & 75 deletions nila_sampling/.ipynb_checkpoints/mrfft-checkpoint.py

This file was deleted.

5 changes: 5 additions & 0 deletions nila_training/.ipynb_checkpoints/train-checkpoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MODEL_FLAGS="--image_size 256 --num_channels 128 --num_res_blocks 2 --num_heads 4 --learn_sigma True"
DIFFUSION_FLAGS="--diffusion_steps 1000 --noise_schedule linear"
TRAIN_FLAGS="--lr 1e-4 --batch_size 8"

mpiexec -n 8 python scripts/image_train.py --data_dir data/fastmri_complex_value/ --log_dir log $MODEL_FLAGS $DIFFUSION_FLAGS $TRAIN_FLAGS
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():

logger.log("creating model and diffusion...")
print(args_to_dict(args, model_and_diffusion_defaults().keys()))
model, diffusion = create_DIT_model_and_diffusion(
model, diffusion = create_model_and_diffusion(
**args_to_dict(args, model_and_diffusion_defaults().keys())
)
model.to(dist_util.dev())
Expand Down
2 changes: 1 addition & 1 deletion nila_training/scripts/image_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def main():

logger.log("creating model and diffusion...")
print(args_to_dict(args, model_and_diffusion_defaults().keys()))
model, diffusion = create_DIT_model_and_diffusion(
model, diffusion = create_model_and_diffusion(
**args_to_dict(args, model_and_diffusion_defaults().keys())
)
model.to(dist_util.dev())
Expand Down
2 changes: 1 addition & 1 deletion nila_training/train.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ MODEL_FLAGS="--image_size 256 --num_channels 128 --num_res_blocks 2 --num_heads
DIFFUSION_FLAGS="--diffusion_steps 1000 --noise_schedule linear"
TRAIN_FLAGS="--lr 1e-4 --batch_size 8"

mpiexec -n 8 python scripts/image_train.py --data_dir data/fastmri_complex_value/ --log_dir log_DIT $MODEL_FLAGS $DIFFUSION_FLAGS $TRAIN_FLAGS
mpiexec -n 8 python scripts/image_train.py --data_dir data/fastmri_complex_value/ --log_dir log $MODEL_FLAGS $DIFFUSION_FLAGS $TRAIN_FLAGS

0 comments on commit afbc59e

Please sign in to comment.