Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

Python – tensorflow.get_logger()

  • Last Updated : 10 Jul, 2020

TensorFlow is open-source Python library designed by Google to develop Machine Learning models and deep learning  neural networks. 

get_logger() is used to get the logger instance.

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course

Syntax: tensorflow.get_logger()



Parameters: It doesn’t accept any parameters.

Returns: It returns the logger instance.

Example 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)

Output:

res:  True

Example 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)

Output:

res:  False





My Personal Notes arrow_drop_up
Recommended Articles
Page :