elvisyjlin / AttGAN-PyTorch

AttGAN PyTorch Arbitrary Facial Attribute Editing: Only Change What You Want
MIT License
248 stars 61 forks source link

One problem in attgan.py #22

Closed liang23333 closed 3 years ago

liang23333 commented 3 years ago

Hi, if i want to change the original attributes to other 14 attributes , in attgan.py i need to modify the self.fc_cls of discriminators, do i need to make any other changes?

elvisyjlin commented 3 years ago

Hi @liang23333, you found the code that I didn't write perfectly. To train the model on other attributes, you need to:

  1. Put your target attributes in attrs_default of train.py.
  2. Set the output dimension of self.fc_cls here to the number of your target attributes. Please overwrite the default value 13 there.

I will fix it in the near future. Thank you!