>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'
Run Code Online (Sandbox Code Playgroud)
如您所见,我在cmd(win 10)中运行此代码."import tensorflow.contrib"和"import tensorflow.python"都可以,但命令"tensorflow.contrib"和"tensorflow.python"是不同的.一个返回一个目录,另一个返回AttributeError.
有没有人知道为什么?