AttributeError: module 'tensorflow.tools.api.generator.api.train' has no attribute 'SummaryWriter'
summary_writer = tf.train.SummaryWriter('/tmp/lstm_logs',session.graph)
改为:
summary_writer = tf.summary.FileWriter('/tmp/lstm_logs',session.graph)
tensorflow.initialize_all_variables已改为tensorflow.global_variables_initializer()
AttributeError: module ‘tensorflow.python.training.training’ has no attribute ‘SummaryWriter’
tf.train.SummaryWriter已废除
使用 tf.summary.FileWriter
AttributeError: module ‘tensorflow’ has no attribute ‘sub’
减法 tf.sub() 已改为tf.subtract()
---------------------
AttributeError: 'module' object has no attribute 'SummaryWriter'
tf.train.SummaryWriter
改为:tf.summary.FileWriter
AttributeError: 'module' object has no attribute 'summaries'
tf.merge_all_summaries()
改为:summary_op = tf.summary.merge_all()
AttributeError: 'module' object has no attribute 'histogram_summary'
tf.histogram_summary()
改为:tf.summary.histogram()
tf.scalar_summary()
改为:tf.summary.scalar()
tf.image_summary()
改为:tf.summary.image()
---------------------
作者:激进的小鸡蛋
来源:CSDN
原文:https://blog.csdn.net/waterydd/article/details/70237984
版权声明:本文为博主原创文章,转载请附上博文链接!
执行如下操作(对应文件夹目录下)
tensorboard --logdir='logs/'
/home/gden/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: 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
TensorBoard 1.11.0 at http://gden-dl:6006 (Press CTRL+C to quit)
复制地址到浏览器就可以执行了