defmy_func(a):print("Python side effect")returna+aa_fn=tf.function(my_func)
# A side effect the first time the function is traceda_fn(tf.constant(1))Pythonsideeffect<tf.Tensor:shape=(),dtype=int32,numpy=2>
# No further side effect, as the traced function is calleda_fn(tf.constant(2))<tf.Tensor:shape=(),dtype=int32,numpy=4>
# Now, switch to eager runningtf.config.run_functions_eagerly(True)# Side effect, as the function is called directlya_fn(tf.constant(2))Pythonsideeffect<tf.Tensor:shape=(),dtype=int32,numpy=4>
# Turn this back offtf.config.run_functions_eagerly(False)
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-23 UTC."],[],[]]