>import tensorflow
>import tensorflow.contrib
>tensorflow.contrib
module 'tensorflow.contrib' from 'D:\\ProgramData\\Anaconda3\\lib\\site-packages\\tensorflow\\contrib\\__init__.py'
>import tensorflow.python
>tensorflow.python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'python'
正如您所看到的,我在cmd(win 10)中运行这段代码。 "import tensorflow.contrib" 和 "import tensorflow.python" 都可以,但是命令 "tensorflow.contrib" 和 "tensorflow.python" 是不同的。一个返回目录,另一个返回AttributeError错误。
有人知道为什么吗?