指示調用者代碼是否在 tf.function
內執行。
用法
tf.inside_function()
例子:
tf.inside_function()
False
@tf.function
def f():
print(tf.inside_function())
f()
True
相關用法
- Python tf.init_scope用法及代碼示例
- Python tf.image.random_brightness用法及代碼示例
- Python tf.image.pad_to_bounding_box用法及代碼示例
- Python tf.io.gfile.GFile.close用法及代碼示例
- Python tf.image.adjust_hue用法及代碼示例
- Python tf.image.random_contrast用法及代碼示例
- Python tf.image.rot90用法及代碼示例
- Python tf.identity_n用法及代碼示例
- Python tf.image.random_hue用法及代碼示例
- Python tf.io.gfile.join用法及代碼示例
- Python tf.io.parse_example用法及代碼示例
- Python tf.image.flip_left_right用法及代碼示例
- Python tf.image.convert_image_dtype用法及代碼示例
- Python tf.image.stateless_random_flip_up_down用法及代碼示例
- Python tf.image.random_saturation用法及代碼示例
- Python tf.image.extract_glimpse用法及代碼示例
- Python tf.image.flip_up_down用法及代碼示例
- Python tf.image.crop_to_bounding_box用法及代碼示例
- Python tf.image.stateless_random_jpeg_quality用法及代碼示例
- Python tf.io.gfile.exists用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.inside_function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。