import keras 出错,应该怎么解决

好奇小学生1 发布于 2018/05/23 12:56
阅读 2K+
收藏 0

>>> import keras
/usr/local/lib/python2.7/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/__init__.py", line 6, in <module>
    from . import conv_utils
  File "/usr/local/lib/python2.7/dist-packages/keras/utils/conv_utils.py", line 9, in <module>
    from .. import backend as K
  File "/usr/local/lib/python2.7/dist-packages/keras/backend/__init__.py", line 84, in <module>
    from .tensorflow_backend import *
  File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 7, in <module>
    from tensorflow.python.ops import tensor_array_ops
  File "/home/guopeisen/.local/lib/python2.7/site-packages/tensorflow/python/ops/tensor_array_ops.py", line 28, in <module>
    from tensorflow.python.framework import dtypes as _dtypes
  File "/home/guopeisen/.local/lib/python2.7/site-packages/tensorflow/python/framework/dtypes.py", line 274, in <module>
    float16 = DType(types_pb2.DT_HALF)
AttributeError: 'module' object has no attribute 'DT_HALF'
>>> import DT_HALF
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named DT_HALF

 

 
 
G
M
T
 
 
Chinese (Simplified)English
 
Chinese (Simplified)English
 
 
 
 
 
 
 
 
 
Text-to-speech function is limited to 200 characters
 
 
Options : History : Feedback : Donate Close
加载中
0
夏洛特_
夏洛特_

更新下keras,有些版本是错误的

夏洛特_
夏洛特_
https://github.com/tensorflow/tensorflow/issues/3711
返回顶部
顶部