美文网首页
解决Python import tensorflow出现Futu

解决Python import tensorflow出现Futu

作者: Stack1_e27c | 来源:发表于2019-12-23 19:30 被阅读0次

安装完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

相关文章

网友评论

      本文标题:解决Python import tensorflow出现Futu

      本文链接:https://www.haomeiwen.com/subject/rartoctx.html