Hello! Our static bug checker has found a performance issue in lime/scripts/lipo_gru/ht_lipo_gru.py: init is repeatedly called in a for loop, but there are several tf.function decorated functions call, call and call defined and called in init.
In that case, when init is called in a loop, the function call will create a new graph every time, and that can trigger tf.function retracing warning.
Similar issues in:
lime/scripts/lipo_gru/ht_lipo_ind_gru.py, lime/scripts/elf_with_wbo/ht_elf_with_wbo.py, lime/scripts/partial_charge/ht_charge.py and lime/scripts/partial_charge/ht_charge_fast.py.
There are some variables in class passed to the function, the code may be more complex if changes are made. Do you have any idea? @dotsdl @jchodera @bas-rustenburg @jaimergp
Hello! Our static bug checker has found a performance issue in lime/scripts/lipo_gru/ht_lipo_gru.py:
init
is repeatedly called in a for loop, but there are several tf.function decorated functionscall
,call
andcall
defined and called ininit
.In that case, when
init
is called in a loop, the functioncall
will create a new graph every time, and that can trigger tf.function retracing warning.Similar issues in: lime/scripts/lipo_gru/ht_lipo_ind_gru.py, lime/scripts/elf_with_wbo/ht_elf_with_wbo.py, lime/scripts/partial_charge/ht_charge.py and lime/scripts/partial_charge/ht_charge_fast.py.
Here is the tensorflow document to support it.
Briefly, for better efficiency, it's better to use:
than:
Looking forward to your reply.