1. 程式人生 > >TensorFlow測試程式報異常:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np

TensorFlow測試程式報異常:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np

使用安裝好的tensorflow-gpu 進行程式測試時出現異常:

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


原因:

    numpy包的版本和h5py包版本不匹配導致

    我的本地numpy版本為1.14.1,h5py版本為2.7.1

解決方案:

方法一: 降級numpy版本

    pip install numpy==1.13.0

方法二: 升級h5py版本

    pip install h5py==2.8.0rc1