描述
运行tensorflow程序时,跳出的一些警告提示的解决办法
持续更新
问题1
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版本过高,我的numpy版本是1.17,需要1.16的版本
解决方法
pip install numpy==1.16.0
问题2
Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2
原因:具体原因自行百度
解决方案:代码中加入如下,用于忽略警告
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'