最近在导入tensorflow_gpu 1.14.0版本(cuda9.2、cudnn7.5)时出了点问题,具体截图如下:
根据报错信息,显示: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对“1type”的使用是有差异的,因此可能该tensorflow版本中对应的numpy版本可能偏高了,因此降低numpy版本即可。
通过 pip list查看可知numpy版本为1.17.3,如下截图:
卸载当前numpy版本安装1.16.0版本,如下截图: