问题如下图:
出现警告:
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)])
虽然还能实现,但是不能错过任何一个警告。
报错原因:NumPy 的版本太高了,要降级。
解决方法:安装低版本的Numpy
# 卸载旧版本
pip uninstall numpy
# 安装新版本
pip install numpy==版本号
如:
# tensorflow 2.0.0-alpha0 将到1.17.0都不行
pip install numpy==1.16.0