tensorflow

Module 'tensorflow' has no attribute 'Session

Riella 2020. 8. 26. 08:41
728x90

I was afraid of the installation was broken, but it was due to the TF version.

So, getting TF 1.x like behavior in TF 2.0

import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()

Reference: https://stackoverflow.com/questions/55142951/tensorflow-2-0-attributeerror-module-tensorflow-has-no-attribute-session