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

Performance issue in /awesome_gans/pggan (by P3) #26

Open
DLPerf opened this issue Aug 25, 2021 · 1 comment
Open

Performance issue in /awesome_gans/pggan (by P3) #26

DLPerf opened this issue Aug 25, 2021 · 1 comment

Comments

@DLPerf
Copy link

DLPerf commented Aug 25, 2021

Hello! I've found a performance issue in /awesome_gans/pggan/pggan_train.py: with tf.Session(config=config) as s(here) is repeatedly called in the loop for idx, n_pg in enumerate(pg)(here).

tf.Session being defined repeatedly could lead to incremental overhead. If you define tf.Session out of the loop and pass tf.Session as a parameter to the loop, your program would be much more efficient. Here is the Stack Overflow post to support it.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

@kozistr
Copy link
Owner

kozistr commented Aug 25, 2021

First of all, thanks for your interest!

Also, thanks so much to report the performance issue on the PGGAN implementation, and PR is always welcome :)

I'm about to port the whole code into TF 2.x to support the latest TF version & resolve compatibility issues. But, I got few resources (time, hardware) these days, So maintaining TF 1.x code is also crucial!

The issue & solution you mentioned make sense, and It'd be really appreciated that opening a PR!

Thanks again!

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

No branches or pull requests

2 participants