-
Notifications
You must be signed in to change notification settings - Fork 156
Performance issues in /examples/evaluation.py (by P3) #75
Copy link
Copy link
Open
Description
Hello! I've found a performance issue in your project:
tf.Sessionbeing defined repeatedly leads to incremental overhead.
You can make your program more efficient by fixing this bug. Here is the Stack Overflow post to support it.
Below is detailed description about tf.Session being defined repeatedly:
- examples/evaluation.py:
session = tf.InteractiveSession(...)(here) is defined in the functioncreate_ground_truth_file(here) which is repeatedly called in the loopfor dataset in datasets(here). - examples/evaluation.py:
session = tf.InteractiveSession(...)(here) is defined in the functioncreate_prediction_file(here) which is repeatedly called in the loopfor dataset in datasets(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.
Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels