akanimax/T2F

TypeError: __init__() got an unexpected keyword argument 'embedding_size'

harbarex opened this issue · 6 comments

When I run train_network.py,

I get the error:


Traceback (most recent call last):
  File "train_network.py", line 428, in <module>
    main(parse_arguments())
  File "train_network.py", line 381, in main
    device=device
TypeError: __init__() got an unexpected keyword argument 'embedding_size'

Does anyone know how to solve this?

@MeteoRex11,

I see. The latest pro_gan_pytorch package has the projection variant of the conditional ProGAN. Could you try some of the previous versions of the package here?

Best regards,
@akanimax

Hi. This error is fixed, but I have a new error now. I changed the following in the config files:

images_dir: "../data/LFW/lfw"

to

images_dir: "../data/LFW/Face2Text/face2text_v0.1/lfw"

And now I am getting the error:
RuntimeError: Expected object of type torch.cuda.LongTensor but found type torch.LongTensor for argument #3 'index'

@MeteoRex11 Were you able to run this code ? After Figuring out errors I Changed the pickle file's version from 4 to 2 as well coz pickle 4 isn't supported in python2.7 . But got a new error saying super() has only 1 argument something in pro GAN. If u ran the code can you make a new repository plz. These codes seem to be buggy.

@MeteoRex11 Were you able to run this code ? After Figuring out errors I Changed the pickle file's version from 4 to 2 as well coz pickle 4 isn't supported in python2.7 . But got a new error saying super() has only 1 argument something in pro GAN. If u ran the code can you make a new repository plz. These codes seem to be buggy.

@iamjhamukesh I ended up using the ProGAN 1.4.4 , and then received a few other errors, which I solved by tweaking the code of torch & trainer.py a bit. But it completely depends on your system, as I was using Python 3.6 instead of 2.7.

@MeteoRex11 Can you Upload the repository of your code on github Plz. I guess your code is better than this one. This one is outdated and doesn't work well. I am stuck with this one since approx 2 weeks

Downgrading to an earlier version of pro-gan-pth fixes this issue.

Run the below command
pip install pro-gan-pth==1.3.3