数据类型的张量流警告 [英] tensorflow warning for data types

查看:47
本文介绍了数据类型的张量流警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Python 3.7.4 [64位]中安装了tensorflow和numpy.尝试导入时,收到以下警告:

I have installed tensorflow and numpy in Python 3.7.4 [64-bit]. When I tried importing it, I get the following warning:

/home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint8 = np.dtype([("qint8",np.int8, 1)]) /home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8,1)]) /home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16,1)]) /home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16,1)]) /home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32,1)]) /home/user/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. np_resource = np.dtype([("resource", np.ubyte,1)])

/home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)])

/home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint8 = np.dtype([("qint8",np.int8, 1)]) /home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8,1)]) /home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16,1)]) /home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16,1)]) /home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32,1)]) /home/user/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning:将(type,1)或'1type'作为type的同义词传递是 不推荐使用在numpy的未来版本中,它将被理解为 (type,(1,))/'(1,)type'. np_resource = np.dtype([("resource", np.ubyte,1)])

/home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)]) /home/user/.local/lib/python3.7/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)])

我有以下版本- numpy的-1.17.0 tensorflow- 1.14.0

I have the following versions- numpy- 1.17.0 tensorflow- 1.14.0

如何解决张量流中不同数据类型的警告?

How can I solve the warnings for the different data types in tensorflow?

谢谢!

推荐答案

这是为了符合numpy此行中的计划更改

What it's saying is that to conform to planned changes in numpy this line

np_resource = np.dtype([("resource", np.ubyte, 1)])

将需要重写为

np_resource = np.dtype([("resource", np.ubyte, (1,))])

我认为这不是您自己的代码.

I don't think this is in your own code.

numpy 1.17中的相关段落是:

The relevant passage in numpy 1.17 is:

https://docs.scipy.org/doc/numpy/release.html#future-changes

这是警告,不是错误.在类似的最新SO中,发布者通过切换到早期的numpy版本摆脱了它.

This is a warning, not an error. In a similar recent SO, the poster got rid of it by switching to an earlier numpy version.

不建议使用type的同义词;在numpy的未来版本中,将被理解为(类型,(1,))/'(1,)类型'. TensorFlow中的问题

这篇关于数据类型的张量流警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆