解决方法:1、忽视警告,并屏蔽警告。开头输入:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
2、进入tensorflow官网,从源码安装。
二、运行tensorflow测试程序时,出现:FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
解决方法: 输入 pip install h5py==2.8.0rc1
三、SyntaxError: Missing parentheses in call to 'print'
出现这个问题是因为你使用的这段python demo和你电脑上安装的python版本不一致,一个是python2,一个是python3,改正方法就是改成配你电脑python的语法格式,如把print result 改为print(result)
四、出现IndentationError:expected an indented block错误
出现这个错误是因为Python语言对缩减非常敏感,出现这个错就说明此处需要缩进。
规律为:末尾有冒号的一行代码的下一行往往都需要缩进。