相关疑难解决方法(0)

Tensorflow:'module'对象没有属性'scalar_summary'

我试着运行以下代码来测试我的TensorBoard,但是,当我运行程序时,有一个错误说:

'module' object has no attribute 'scalar_summary'
Run Code Online (Sandbox Code Playgroud)

我想知道如何解决这个问题,谢谢.

以下是系统信息:

  • 操作系统:Ubuntu 16.04 LTS
  • Tensorflow版本:0.12rc(主)
  • 运行环境:Jupyter Notebook

测试程序和输​​出: 在此输入图像描述

tensorflow

18
推荐指数
2
解决办法
3万
查看次数

Keras + tensorflow给出错误"无属性'control_flow_ops'"

我想第一次运行keras.我安装了以下模块:

pip install keras --user
pip install tensorflow --user
Run Code Online (Sandbox Code Playgroud)

然后尝试运行https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py.

但它给了我:

AttributeError: 'module' object has no attribute 'control_flow_ops'
Run Code Online (Sandbox Code Playgroud)

这些是我正在使用的版本.

print tensorflow.__version__
0.11.0rc0
print keras.__version__
1.1.0
Run Code Online (Sandbox Code Playgroud)

我能做些什么才能让keras与tensorflow一起运行?

python ubuntu machine-learning keras tensorflow

11
推荐指数
1
解决办法
2万
查看次数

Keras + TensorFlow:“模块'tensorflow'没有属性'merge_all_summaries'”

非常相似,Keras + tensorflow给出了错误“没有属性‘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'
Run Code Online (Sandbox Code Playgroud)

我试过了

import tensorflow as tf
tf.merge_all_summaries = tf
Run Code Online (Sandbox Code Playgroud)

但这没有用。我该怎么办?

AttributeError中:“模块”对象没有属性“ merge_all_summaries”,其中提到了错误。我也有版本1.0.0。但是,解决方案是什么?我不想降级TensorFlow。

python keras tensorflow

4
推荐指数
1
解决办法
9908
查看次数

标签 统计

tensorflow ×3

keras ×2

python ×2

machine-learning ×1

ubuntu ×1