Answers for "keras module 'tensorflow' has no attribute 'Session'"

2

AttributeError: module 'tensorflow' has no attribute 'Session' site:stackoverflow.com

sess = tf.compat.v1.Session()

print(sess.run(hello))
Posted by: Guest on June-26-2020
1

module 'tensorflow' has no attribute 'session'

import tensorflow as tf

tf.compat.v1.disable_eager_execution()

hello = tf.constant('Hello, TensorFlow!')

sess = tf.compat.v1.Session()

print(sess.run(hello))
Posted by: Guest on March-17-2021

Code answers related to "keras module 'tensorflow' has no attribute 'Session'"

Python Answers by Framework

Browse Popular Code Answers by Language