google-research / morph-net

Fast & Simple Resource-Constrained Learning of Deep Network Structure
Apache License 2.0
1.02k stars 148 forks source link

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

Open DLPerf opened 3 years ago

DLPerf commented 3 years ago

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 and tf.to_float 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.

DLPerf commented 3 years ago

@wcn3 Hi, my friend, could you consider my issue?