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

    技术2022-07-11  72

    完整错误信息:

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

    Processed: 0.010, SQL: 9