CycleGAN icon indicating copy to clipboard operation
CycleGAN copied to clipboard

Performance issue in train.py

Open DLPerf opened this issue 2 years ago • 1 comments

Hello! Our static bug checker has found a performance issue in train.py: Python type argument ep is passed to tf.function decorated function lr_sch instead of tensors. As there is a for loop, every time the value changes, a new graph will be generated, and that can trigger tf.function retracing warning.

Here is the tensorflow document to support it.

Looking forward to your reply.

DLPerf avatar Mar 08 '23 01:03 DLPerf

Maybe you can just pass ep as tf.constant(ep). We are investigating this kind of issues, and your answer will be of great help to our work. Thank you in advance! @Katexiang

DLPerf avatar Mar 08 '23 01:03 DLPerf