xavysp / DexiNed

DexiNed: Dense EXtreme Inception Network for Edge Detection
MIT License
707 stars 155 forks source link

Performance issues in the definition of pre_process_binary_cross_entropy, DexiNed-TF2/model.py(P1) #90

Open DLPerf opened 2 years ago

DLPerf commented 2 years ago

Hello, I found a performance issue in the definition of pre_process_binary_cross_entropy, DexiNed-TF2/model.py, tf.cast(y, dtype=tf.float32) will be created repeatedly during program execution, resulting in reduced efficiency. I think it should be created before the loop.

The same issues exist in:

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

xavysp commented 2 years ago

Hi @DLPerf thanks, I'll fix next week because now I am finishing the last version of DexiNed-Pythorch.