TensorFlow是Google設計的開源Python庫,用於開發機器學習模型和深度學習神經網絡。
get_logger()用於獲取記錄器實例。
用法:tensorflow.get_logger()
參數:它不接受任何參數。
返回:它返回記錄器實例。
範例1:
Python3
# Importing the library
import tensorflow as tf
# Fetting logger instance
logger = tf.get_logger()
# Checking if propagation is enabled
res = logger.propagate
# Printing the result
print('res:',res)
輸出:
res: True
範例2:
Python3
# Importing the library
import tensorflow as tf
# Fetting logger instance
logger = tf.get_logger()
# Disabling the propagation
logger.propagate = False
# Checking if propagation is enabled
res = logger.propagate
# Printing the result
print('res:',res)
輸出:
res: False
相關用法
注:本文由純淨天空篩選整理自aman neekhara大神的英文原創作品 Python – tensorflow.get_logger()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。