CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

Question about training stage 3

Open nnnnn7896 opened this issue 2 years ago • 0 comments

Hi, I'm very interesting in your paper and I'm trying to reproduce the training process. I found that in your paper you said stage 3 is to finetune encoder, but in your code the gradiant of encoder features is removed by .detach(). This means encoder will not be updated in stage 3. I'm very confuse about this. Could you help me with this double? By the way, will the decoder also require gradiant during training?

    for i, block in enumerate(self.generator.blocks):
        x = block(x) 
        if i in fuse_list: # fuse after i-th block
            f_size = str(x.shape[-1])
            if w>0:
                x = self.fuse_convs_dict[f_size](enc_feat_dict[f_size].detach(), x, w)

Thank you for your help!

nnnnn7896 avatar Mar 10 '23 10:03 nnnnn7896