liuqk3 / PUT

Paper 'Transformer based Pluralistic Image Completion with Reduced Information Loss' in TPAMI 2024 and 'Reduce Information Loss in Transformers for Pluralistic Image Inpainting' in CVPR2022
MIT License
173 stars 15 forks source link

How to set the parameters target and name and use the pre-training parameters? #7

Open shumile66 opened 2 years ago

shumile66 commented 2 years ago

Thank you very much for your work, but I have two questions: First, there are target and name in the parameter. I see that the name is very complicated, and I would like to ask what rules are followed in the setting of it? Second, I saw in the previous reply that the training is divided into two stages, but when I loaded the pre-training parameters you shared, it was not successful.

liuqk3 commented 2 years ago

Hi @shumile66 ,

Thanks for your interests! 1) Is it the name in optimizers_and_schedulers that your are confused? It is used to train GAN like models, where two (or more) different parts need to be trained in different iterations. Once the name is provided, the model will return the corresponding patameters acoording to the given name throhg the overwritten function parameters(self, recurse=True, name=None) (Please take image_synthesis/modeling/codecs/image_codec/patch_vqgan.py as an example). After getting the parameters need to be trained, Solver will create different optimizers for different part parameters. https://github.com/liuqk3/PUT/blob/7de8ce0ada1e63e8c5300857a463d68380e142f0/image_synthesis/modeling/codecs/image_codec/patch_vqgan.py#L1137

2) Did you download the pretrained model from OneDrive or BaiDuYunPan? Due to some mysterious reasons, I failed to upload the models to BaiduYunPan. You can download them from OneDrive.

Thansk.