FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a future version

完整错误信息:

C:\Users\Lihjia\Anaconda3\envs\tf114gpu\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8,1)])

解决办法:

点击错误信息中的页面链接,进入到dtypes.py文件。将_np_qint8 = np.dtype([("qint8", np.int8,1)])改为

_np_qint8 = np.dtype([("qint8", np.int8,(1,))])

本人用的tensorflow1.14.0,此处需更改两个文件共12处。如下图所示:

猜你喜欢

转载自blog.csdn.net/hbu_pig/article/details/107070515