Tag Archives: # TensorFlow

Tensorflow error: module ‘tensorflow’ has no attribute ‘xxx’

____tz_zs

good tensorflow appears suddenly: can import the tensorflow package, but using any module under tensorflow will report a “nonexistence” error.

such as: using tf.variable to create a Variable also reports AttributeError: module ‘tensorflow’ has no attribute ‘Variable ‘.

because tensorflow becomes a module without any content (the reason why tensorflow becomes empty is unknown)

solution: uninstall tensorflow (based on the PIP uninstall tensorflow or PIP uninstall tensorflow-gpu you installed) and reinstall it (based on the PIP install tensorflow or PIP install tensorflow-gpu you installed)

ps: according to some discussion information found by Google, when tensorflow was installed under Windows, it also appeared that the tensorflow was empty, possibly because of the permission problem.

add:

Windows TensorFlow installation: http://blog.csdn.net/tz_zs/article/details/74779953

making similar discussion: https://github.com/tensorflow/tensorflow/issues/7285