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 issues in your project (by P3) #94

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

Performance issues in your project (by P3) #94

DLPerf opened this issue Aug 25, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@DLPerf
Copy link

DLPerf commented Aug 25, 2021

Hello! I've found a performance issue in your project:

  • tf.Session being 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:

  • tensorflow_/tensorflowcv/models/resnext.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/shufflenetv2b.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/zfnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/igcv3.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/densenet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/squeezenet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/mobilenet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/menet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/darknet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/seresnext.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/seresnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/mobilenetv2.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/sepreresnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/resnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/shufflenetv2.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/vgg.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/preresnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/channelnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/darknet53.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/shufflenet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/senet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/alexnet.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tensorflow_/tensorflowcv/models/squeezenext.py: with tf.Session() as sess(here) is repeatedly called in the loop for model in models(here).
  • tests/convert_gl2tf_batchnorm.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_conv1x1.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_maxpool2d.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_gconv2d.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_conv2d.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_avgpool2d.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_dwconv2d.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(here).
  • tests/convert_gl2tf_dense.py: with tf.Session() as sess(here) is repeatedly called in the loop for i in range(10)(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.

@osmr
Copy link
Owner

osmr commented Aug 25, 2021

Thanks, but this is not necessary. It's all the test and seldom-used parts of the code.

@osmr osmr self-assigned this Aug 25, 2021
@osmr osmr added the enhancement New feature or request label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants