TensorFlow提示:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated

深度学习TensorFlow 2864

TensorFlow运行时提示:

D:\Anaconda3\lib\site-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

其实这个不是错误,不会对程序运行有影响,如果要去掉这个信息可以按照以下操作方法来去除这个信息提示.

#Option 1: 在顶部加入代码

import os
os.environ["TF_CPP_MIN_LOG_LEVEL"]="3"

#Option 2:

这是个非常普遍的问题了,参考官方的Issues,最新的h5py库已经修复了这个问题,我们只需要用pip运行升级命令即可

pip install h5py==2.8.0rc1

升级成功

$ pip install "h5py==2.8.0rc1"
Collecting h5py==2.8.0rc1
  Using cached https://files.pythonhosted.org/packages/9e/cf/a6e35cc6273c8be51f3b02cc2aac73ab15e9e41338e1a3cb46118650de8c/h5py-2.8.0rc1-cp36-cp36m-win_amd64.whl
Requirement already satisfied: six in d:\anaconda3\lib\site-packages (from h5py==2.8.0rc1)
Requirement already satisfied: numpy>=1.7 in d:\anaconda3\lib\site-packages (from h5py==2.8.0rc1)
Installing collected packages: h5py
  Found existing installation: h5py 2.7.1
    Uninstalling h5py-2.7.1:
      Successfully uninstalled h5py-2.7.1
Successfully installed h5py-2.8.0rc1

Post Comment