多语言展示
当前在线:967今日阅读:91今日分享:37

安装tensorflow,jupyter计算警告如何解决?

警告信息:/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,如何解决?
工具/原料

python2.7

方法/步骤
1

安装tensorflow后,进入jupyter后台

2

输入测试代码:import tensorflow as tfa = tf.constant(10)b = tf.constant(32)with tf.Session():    c = tf.add(a,b)    print(c)    print(c.eval())

3

运行时报错:/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

4

结果正确,但有警告,可以忽略。如果不想有提示,可以打开cmd,输入:pip install h5py==2.8.0rc1

5

重新运行,就没有了。

推荐信息