source code
import tensorflow as tf
constant_a = tf.constant('Hello World!')
with tf.Session() as session:
print(session.run(constant_a))
problem log
2022-04-14 16:26:07.486097: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "....source_code_path/main.py", line 3, in <module>
with tf.Session() as session:
AttributeError: module 'tensorflow' has no attribute 'Session'
enviroment
running in virtualenv.
python: 3.9.7
tensorflow: 2.8.0
SOS.(TAT)