improved-diffusion icon indicating copy to clipboard operation
improved-diffusion copied to clipboard

How to setup our hyper-parameter?

Open HOMGH opened this issue 3 years ago • 3 comments

Hi, Thanks for sharing the code. Just wondering how to set our hyper parameters in the flags? I changed some of the hyper parameters in "def model_and_diffusion_defaults():" function in "script_utils.py". But it seems, it's still training with the default parameters. Is there any other file that should be changed?

Thanks.

HOMGH avatar Oct 27 '22 13:10 HOMGH

Did you know how to set them? I am facing the same problem

Shaaii22 avatar Jan 29 '23 15:01 Shaaii22

create a new sh file with the following flags ''' #!/bin/bash MODEL_FLAGS="--image_size 64 --num_channels 128 --num_res_blocks 3" DIFFUSION_FLAGS="--diffusion_steps 100 --noise_schedule linear" TRAIN_FLAGS="--lr 1e-4 --batch_size 128" ''' Save it as a file (e.g. my_script.sh) and make it executable using the command chmod +x my_script.sh.

Then, you can run the script with the command ./my_script.sh

To change the parameters, edit my_script.sh file and run ./myscript.sh file again.

Hope this helps.

thamizhaiap avatar Mar 30 '23 09:03 thamizhaiap

create a new sh file with the following flags ''' #!/bin/bash MODEL_FLAGS="--image_size 64 --num_channels 128 --num_res_blocks 3" DIFFUSION_FLAGS="--diffusion_steps 100 --noise_schedule linear" TRAIN_FLAGS="--lr 1e-4 --batch_size 128" ''' Save it as a file (e.g. my_script.sh) and make it executable using the command chmod +x my_script.sh.

Then, you can run the script with the command ./my_script.sh

To change the parameters, edit my_script.sh file and run ./myscript.sh file again.

Hope this helps.

hello, @thamizhaiap, thanks for your reply, but I still have question: If I have cteated a my_script.sh file as you described above, what command should I run to perform the command: "python scripts/image_train.py --data_dir path/to/images $MODEL_FLAGS $DIFFUSION_FLAGS $TRAIN_FLAGS" with my_script.sh to train?

LinWeiJeff avatar Dec 12 '23 02:12 LinWeiJeff