Cannot see prints with python-tensorflow
Question: I have the following program written in python:

import tensorflow as tf

def main(_): print(something)

if **name** == 'main': tf.app.run()

Either running it with bazel or not, I cannot see the output of print
function. Why?


Answer: I think the problem is with the last line, which should be

    
    
    if __name__ == '__main__': tf.app.run() 
    

(note: __main__ instead of main)... This code works for me:

    
    
    import tensorflow as tf
    
    def main(_):
        print("something")
    
    if __name__ == '__main__':
        tf.app.run()
    

