[英]Module 'tensorflow' has no attribute 'python'
If I run this code: 如果我运行此代码:
import tensorflow as tf
print(tf.VERSION)
pyt = tf.python
I get version 1.6.0, but also the error: 我得到的版本是1.6.0,但也有错误:
module 'tensorflow' has no attribute 'python'
Why is that? 这是为什么?
Tensorflow's __init__.py
manually removes the python
name from the tensorflow
module's namespace : Tensorflow的
__init__.py
从tensorflow
模块的命名空间中手动删除python
名称 :
del python
The contents of the tensorflow.python
submodule should be accessed through tensorflow
directly. tensorflow.python
子模块的内容应直接通过tensorflow
访问。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.