【发布时间】:2017-03-03 18:03:07
【问题描述】:
与Keras + tensorflow gives the error "no attribute 'control_flow_ops'" 非常相似,来自https://blog.keras.io/building-autoencoders-in-keras.html 的卷积自动编码器示例我得到了错误
[...]lib/python3.5/site-packages/keras/callbacks.py in _set_model(self, model)
478 tf.histogram_summary('{}_out'.format(layer),
479 layer.output)
--> 480 self.merged = tf.merge_all_summaries()
481 if self.write_graph:
482 if parse_version(tf.__version__) >= parse_version('0.8.0'):
AttributeError: module 'tensorflow' has no attribute 'merge_all_summaries'
我试过了
import tensorflow as tf
tf.merge_all_summaries = tf
但这没有用。我该怎么办?
在AttributeError: 'module' object has no attribute 'merge_all_summaries' 中提到了错误。我也有版本 1.0.0。但是解决方案是什么?我不想降级 TensorFlow。
【问题讨论】:
标签: python tensorflow keras