openai / guided-diffusion

MIT License
6.03k stars 803 forks source link

infinite while loop in TrainLoop.run_loop #59

Closed tahaceritli closed 1 year ago

tahaceritli commented 2 years ago

Hi,

Thanks for sharing this repo!

I am trying to train the models from scratch. It seems that TrainLoop(...).run_loop() function has a while loop that is running on infinitely, as self.lr_anneal_steps is set 0. I'm referring to the code snippet given below: while ( not self.lr_anneal_steps or self.step + self.resume_step < self.lr_anneal_steps ):

I suppose that it is safe to define a num_iterations parameter and use it in this loop? If so, I suppose this parameter is the one reported in Table 11-13 of the arXiv paper.

I would appreciate if you could clarify this.

Best, Taha

hxy-123-coder commented 1 year ago

Hello!I have same question with you.Do you solve it? Could you share your solution?Thanks a lot.

tahaceritli commented 1 year ago

I have just defined a separate variable for the number of iterations and checked if self.step is lower than that, like:

num_iterations = 600000
while self.step < num_iterations:
...

I haven't tried to reproduce the tables in the paper though.

hxy-123-coder commented 1 year ago

Ok,Thank you!