代码之家  ›  专栏  ›  技术社区  ›  Jsevillamol

可以从tensorflow.python.keras导入元素,但不能将模块作为一个整体导入

  •  1
  • Jsevillamol  · 技术社区  · 8 年前

    下面的python会话有何意义?

    (ctlearn) jsevillamol@jsevillamol-N551JK:~/Documentos/ctlearn_keras$ python
    Python 3.6.5 | packaged by conda-forge | (default, Apr  6 2018, 13:39:56) 
    [GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from tensorflow.python.keras.models import Model
    >>> import tensorflow.python.keras as K
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: module 'tensorflow' has no attribute 'python'
    

    我可以进口 tensorflow.python.keras.models ,但不导入 tensorflow.python.keras .

    什么。我都不知道。

    0 回复  |  直到 8 年前
    推荐文章