Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
harbarex opened this issue Apr 16, 2019 · 6 comments

Comments

@harbarex
Copy link

harbarex commented Apr 16, 2019

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 harbarex changed the title TypeError: __init__() got an unexpected keyword argument 'embedding_size' UnpicklingError: invalid load key, '<'. Apr 18, 2019
@harbarex harbarex changed the title UnpicklingError: invalid load key, '<'. TypeError: __init__() got an unexpected keyword argument 'embedding_size' Apr 21, 2019
@akanimax
Copy link
Owner

@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 akanimax mentioned this issue Apr 25, 2019
@harbarex
Copy link
Author

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'

@jhamukesh998
Copy link

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

@harbarex
Copy link
Author

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

@jhamukesh998
Copy link

jhamukesh998 commented Jun 10, 2019

@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

@somanshreddy
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants