PyTorch-progressive_growing_of_gans icon indicating copy to clipboard operation
PyTorch-progressive_growing_of_gans copied to clipboard

Might be a bug during fade in

Open kunrenzhilu opened this issue 7 years ago • 0 comments

This line

        for it in range(from_it, total_it):
            if phase == 'stabilize':
                cur_level = R
            else:
                cur_level = R + total_it/float(from_it)
            cur_resol = 2 ** int(np.ceil(cur_level+1))

is problematic.

That's because, when fade in, the from_it = (train_kimg)//batch_size, total_it = (train_kimg+total_kimg)//batch_size so the according to your code, cur_level will always be R+1.99. But it should be something progressively increasing from [R, R+1].

It should be

        for it in range(from_it, total_it):
            if phase == 'stabilize':
                cur_level = R
            else:
                cur_level = R + (it - from_it) / float(total_it - from_it)
            cur_resol = 2 ** int(np.ceil(cur_level+1))

Please correct me if my understanding is wrong.

kunrenzhilu avatar May 18 '18 02:05 kunrenzhilu