win10在pycharm里面运行tensorflow-gpu版本的时候,会出现下面一句警告:
D:\ProgramData\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_converter
原因是h5py 和 numpy 版本冲突。
h5py 官方已修复,但没发新版本出来,所以只能在发版之前可以用降级 numpy 的方法跳过这个问题。要注意,降级之前先卸载之前的版本。
pip uninstall numpy
pip install numpy==1.XX.X
numpy==1.XX.X的版本需要和你安装的tensorflow需要的版本相对应,否则会出现错误。