I entered these code in PyCharm and included Tensorflow in interpreter:
import tensorflow
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
However the terminal didn't print anything and output was "Process finished with exit code -1073741819 (0xC0000005)"
Replace import tensorflow with import tensorflow as tf, also it is probably good to rename your script other than tf.py.
You are refering to tf in your code, therefore you have to import tensorflow as tf.
In addition you should rename your filename. For example change tf.py to main.py.
User contributions licensed under CC BY-SA 3.0