google-research / google-research/morph-net

Performance issue in the definition of create_test_input, examples/slim/nets/resnet_v1_test.py

Open
#202 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

Hello, I found a performance issue in the definition of `create_test_input`, examples/slim/nets/resnet_v1_test.py, `create_test_input` is called by [testDepthMultiplier](https://github.com/google-research/morph-net/blob/49c5679e03c79e56ac013c7b62a88e5d893b9d14/examples/slim/nets/resnet_v1_test.py#L554) and [tf.to_float](https://github.com/google-research/morph-net/blob/49c5679e03c79e56ac013c7b62a88e5d893b9d14/examples/slim/nets/resnet_v1_test.py#L48) will created repeatedly during program execution, resulting in reduced efficiency. I think it should be created before the loop in `create_test_input`.

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.