Skip to content

Performance issues in your project (by P3) #94

@DLPerf

Description

@DLPerf

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions