SummitKwan / transparent_latent_gan

Use supervised learning to illuminate the latent space of GAN for controlled generation and edit
MIT License
1.97k stars 363 forks source link

Application stuck at GUI loading #17

Open baalimago opened 5 years ago

baalimago commented 5 years ago

Hello!

It almost works, but gets stuck when the GUI loads. Pic included. Using latest version of tensorflow, cuda 9.0, windows 10. I'm sort of bad at python, so I'm unsure how to debug it properly.

I tried the online kaggle notebook, super cool stuff!

Thanks in advance!

Pic: Where it get stuck issue_not_loading

UPDATE: I ran the notebook instead of trying to start an individual GUI and that worked just fine

SummitKwan commented 5 years ago

Hi iamimago,

Thank you for your feedback! I am glad the notebook version works. Sorry I can not tell what is going on with the script version based on the console output. If I have to guess, I would say it may have something todo with the matplotlib backend, which is the "graphic engine" for making plots.

I chose the "TkAgg" in the script by saying in the script

import matplotlib
matplotlib.use('TkAgg')

What might have happened is that this particular backend may not have been installed in your machine.
Maybe you can try using other backend like Qt5Agg, WXAgg, GTK3Agg as s starting point for diagnosis. Let me know if it works

To diagnose if one particular backend (e.g. 'TkAgg') works or not. You can try the following code:

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import numpy as np

plt.figure()
plt.plot(np.random.rand(10))

This will pop up and figure window and draw a line connecting 10 random points if the backend works

pixieDoug commented 5 years ago

@iamimago Follow @SummitKwan suggestion and try Qt5Agg and ensure that your libs are up-to-date (easy to do with Anaconda/conda or pip). Additionally, I use Qt locally and the code runs perfectly. Post your results here and I'll see if I can help further.

SummitKwan commented 5 years ago

@pixieDoug Thank you for your clarification!

baalimago commented 5 years ago

It seems to be on my end, trying the simple graph didn't work either.

I'm just going to stick to the notebook, python man.. sigh. Sorry for reporting non-issue!

Btw, I did some cool animations by turning the frame by frame and assembling into a clip. Here's the result (in lack of better messaging system): https://imgur.com/a/uwZDMM6

SummitKwan commented 5 years ago

@iamimago Thank you for the feedback! I think I should have added instructions on using the notebook to the README.md page.

BTW, great gifs!

SummitKwan commented 5 years ago

I have added instructions on the how to use Jupyter notebook on the README page in case Matplotlib does not work

sebdelp commented 5 years ago

I had the same issue. It was due to the Spyder environnement. Basically, you need to modify the options: Tools > Preferences > IPython Console > Graphics > Backend and change it from "Inline" to "Automatic". Also in the Graphic pane I did use "Qt5" and modify the code accordingly: matplotlib.use('Qt5Agg')

Hope this help...

rishabhshah13 commented 4 years ago

Run the same file in Python IDLE. It will work.