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处。如下图所示:

FutureWarning: Passing (type, 1) or ‘1type‘ as a synonym of type is deprecated; in a future version_第1张图片

你可能感兴趣的:(问题记录,tensorflow,numpy)