首页 > 其他 > 详细

TensorFlow各种问题记录

时间:2020-04-06 10:19:26      阅读:247      评论:0      收藏:0      [点我收藏+]

问题1

D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:516: 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)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:517: 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)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:518: 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_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:519: 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_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:520: 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_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorflow\python\framework\dtypes.py:525: 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_resource = np.dtype([("resource", np.ubyte, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: 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)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: 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)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: 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_qint16 = np.dtype([("qint16", np.int16, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: 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_quint16 = np.dtype([("quint16", np.uint16, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: 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_qint32 = np.dtype([("qint32", np.int32, 1)])
D:\anaconda3\envs\cpu_avx2\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: 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_resource = np.dtype([("resource", np.ubyte, 1)])

解决

先卸载重新指定的1.16.4版本的numpy即可解决此问题,建议把需要执行的这个项目建个虚拟环境测试,以免影响其他代码或者项目

pip uninstall numpy
pip install numpy==1.16.4

问题2

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

解决

代码仓库 https://github.com/fo40225/tensorflow-windows-wheel 找到支持avx2的 例如

技术分享图片

 

 下载并放到User\Administrator中,然后install

(cpu_avx2) PS C:\Users\Administrator> pip install .\tensorflow-1.14.0-cp37-cp37m-win_amd64.whl

 

问题3

在Pycharm中使用TensorFlow

技术分享图片

技术分享图片

 

 技术分享图片

 

 技术分享图片

 

TensorFlow各种问题记录

原文:https://www.cnblogs.com/kubab119/p/12640238.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!