Evolving-AI-Lab / ppgn

Code for paper "Plug and Play Generative Networks"
MIT License
540 stars 102 forks source link

'get_code' is not defined - when using init_file #7

Closed jakeelwes closed 7 years ago

jakeelwes commented 7 years ago

Hey @anguyen8

I'm trying to start the generation from an image (this is the function of the init_file right?), it all runs fine with 'None' for the init_file path

but with a path for init_file I'm getting this error: (the jpg file's path and dimensions are definately correct)

Traceback (most recent call last):
  File "./sampling_class.py", line 214, in <module>
    main()
  File "./sampling_class.py", line 166, in main
    start_code, start_image = get_code(encoder=encoder, path=args.init_file, layer=args.opt_layer)
NameError: global name 'get_code' is not defined
anguyen8 commented 7 years ago

@jakeelwes : ah sorry, I think I didn't have the function get_code https://github.com/Evolving-AI-Lab/synthesizing/blob/master/act_max.py#L34 in this file.

I will try to update soon. If you want to fix it now, you could copy that get_code from the link above.

anguyen8 commented 7 years ago

I've added Experiment 6 for this.