lucidrains / lightweight-gan

Implementation of 'lightweight' GAN, proposed in ICLR 2021, in Pytorch. High resolution image generations that can be trained within a day or two
MIT License
1.62k stars 220 forks source link

Truncation psi not doing anything? #51

Open mewo2 opened 3 years ago

mewo2 commented 3 years ago

This may be me missing something screamingly obvious, but I can't see anywhere in the code where the trunc_psi parameter is actually used. In particular, generate_truncated looks like this:

    def generate_truncated(self, G, style, trunc_psi = 0.75, num_image_tiles = 8):
        generated_images = evaluate_in_chunks(self.batch_size, G, style)
        return generated_images.clamp_(0., 1.)

That doesn't seem to do the truncation at all, and experimentation backs this up: varying psi has no discernible effect on the generated images.

lucidrains commented 3 years ago

@mewo2 yup, i tried to add truncation but wasn't getting good results. i've remove all traces of it in the latest commit!