You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Our static bug checker has found a performance issue in Tensorflow/models/research/sequence_projection/sgnn/sgnn.py: fused_project is repeatedly called in a for loop, but there is a tf.function decorated function func defined and called in fused_project.
In that case, when fused_project is called in a loop, the function func will create a new graph every time, and that can trigger tf.function retracing warning.
But some variables are depending on the outer function. Code may be more complex if changes are made. Is it necessary to make the change or do you have any other ideas? @PaulJoshi
Hello! Our static bug checker has found a performance issue in Tensorflow/models/research/sequence_projection/sgnn/sgnn.py:
fused_project
is repeatedly called in a for loop, but there is a tf.function decorated functionfunc
defined and called infused_project
.In that case, when
fused_project
is called in a loop, the functionfunc
will create a new graph every time, and that can trigger tf.function retracing warning.Here is the tensorflow document to support it.
Briefly, for better efficiency, it's better to use:
than:
Looking forward to your reply.
The text was updated successfully, but these errors were encountered: