日付を保存! Google I / Oが5月18日から20日に戻ってきます今すぐ登録

tf.inside_function

Indicates whether the caller code is executing inside a tf.function.

Boolean, True if the caller code is executing inside a tf.function rather than eagerly.

Example:

tf.inside_function()
False
@tf.function
def f():
  print(tf.inside_function())
f()
True