警告内容如下
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 版本与 tensorflow 版本不兼容,这里 numpy 使用了最新版 1.17.2
解决办法:使用 numpy 1.17 以下版本
本文详细解析了一个常见的编程错误,即当使用TensorFlow时遇到与NumPy版本不兼容的问题。具体表现为警告信息,指出NumPy的特定用法在未来的版本中将被解释为不同的类型。解决此问题的方法是回退到NumPy的旧版本,即1.17以下,以确保与TensorFlow的兼容性。
1525

被折叠的 条评论
为什么被折叠?



