python - 可以从 tensorflow.python.keras 导入元素,但不能将模块作为一个整体
问题描述
下面的 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
。
什么。我什至没有。
解决方案
推荐阅读
- angularjs - 将angular项目转为npm模块后的html、css等文件去哪了,项目如何转为npm模块?
- excel - Excel VBA - 替换表格列中的文本
- c - 使用 # 和 ## 运算符的嵌套宏实现
- ios - Why isn't my ARKit Video showing in app view
- node.js - API调用后不知道如何使用csv-writer逐行写入csv文件
- c++ - 如何查找/删除具有特定参数的结构向量的元素?
- r - 在 rstan 中指定矩阵的先验分布
- ios - Move subview in front of other subview without preventing interaction
- node.js - Azure NodeJS Web 服务存在,状态码为 null 并发出信号 SIGSEGV
- python - 解析失败:不支持的文件格式“py”