TigistAbebaw sorry I didn't explain that I also altered part of visualize()
codes in utils.py such that the generated txt file would be used for visualization. Please take following steps:
- Run
generate_samples()
, which will create a sample_file.txt. - Run
DCGAN.main()
in test mode and make sureoption=0
forvisualize()
. - Select images by hand from generated png file that you need for arithmetic calculation (take smiling woman for example), and copy corresponding sample vector (examplar vector) in sample_file.txt to a new txt file.
- Repeat 1-3 until you have 3 different examplar vectors (smiling woman, normal woman and normal man). Name this new txt file as exemplar_vector.txt.
- Run
alrithmetic_sample()
which performs arithmetic calculation between 3 examplar vectors and generates a new sample_file.txt. - Run
DCGAN.main()
in test mode and setoption=0
invisualize()
. Now arithmetic result image will be generated.
Pardon me if the procedures are far more complicated than a single script file. But I believe it introduces more freedom in the process.
https://github.com/johnhany/DCGAN-tensorflow