D:\Software\Anaconda\envs\tensorflow\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'.
这种认真看一下英语,把提示的dtype.py文件里的(type, 1)改成(type, (1, ))。每一条警告对应一个,都改完就没了。
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
这种是CPU的一个提示,,如果用的是GPU,无视它。或者加入下面的代码。
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
module 'tensorflow.compat.v1' has no attribute 'contrib'
解决tensorflow2.0后没有contrib的问题
在开始导入
import tensorflow.contrib as contrib
AttributeError: 'module' object has no attribute 'global_variables_initializer'
运行代码中出现这个问题,原因是tensorflow更新了tf.global_variables_initializer()
将其更改为tf.initialize_all_variables()即可解决问题
网友评论