解决Python import tensorflow出现Futu

2019-12-23  本文已影响0人  Stack1_e27c

安装完tensorflow1.14之后,在编译器PyCharm中

import tensorflow as tf

在源码文件dtype.py中出现了这样的FutureWarning

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_quint8 = np.dtype([("quint8", np.uint8, 1)])

并且在文件中出现了多处类似的Warning

解决方案:从控制台报错的地方点击dtype.py文件,修改其中的源码

_np_qint8 = np.dtype([("qint8", np.int8, 1)])

_np_qint8 = np.dtype([("qint8", np.int8, (1,))])

并将其他报错的代码都按照以上格式修改即可

Process finished with exit code 0
上一篇 下一篇

猜你喜欢

热点阅读