T2F icon indicating copy to clipboard operation
T2F copied to clipboard

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

Open harbarex opened this issue 5 years ago • 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?

harbarex avatar Apr 16 '19 10:04 harbarex

@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

akanimax avatar Apr 25 '19 04:04 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'

harbarex avatar Apr 25 '19 14:04 harbarex

@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.

jhamukesh998 avatar Jun 10 '19 03:06 jhamukesh998

@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.

harbarex avatar Jun 10 '19 05:06 harbarex

@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

jhamukesh998 avatar Jun 10 '19 05:06 jhamukesh998

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

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

somanshreddy avatar Dec 27 '19 07:12 somanshreddy