相关疑难解决方法(0)

在 Keras 上使用回调 Tensorboard 时出现 AttributeError:“模型”对象没有属性“run_eagerly”

我已经使用 Keras 的函数式 API 构建了一个模型,当我将 tensorboard 实例添加到我的 model.fit() 函数中的回调时,它会抛出一个错误: "AttributeError: 'Model' object has no attribute 'run_eagerly'"

Model 类确实没有属性 run_eagerly,但在 Keras 文档中,它说它可以作为参数传递给 model.compile() 函数。这返回

"ValueError: ('Some keys in session_kwargs are not supported at this time: %s', dict_keys(['run_eagerly']))"
Run Code Online (Sandbox Code Playgroud)

这是否意味着我没有合适的 Tensorflow/Keras 版本?

张量流:1.14.0

Keras:2.2.4-tf

model = Model(inputs=[input_ant1, input_ant2], outputs=main_output)

tensorboard = TensorBoard(log_dir='.logs/'.format(time()))

[...]

model.fit([input1, input2],[labels], epochs=10, callbacks=[tensorboard])
Run Code Online (Sandbox Code Playgroud)

python keras tensorflow valueerror

6
推荐指数
1
解决办法
5271
查看次数

标签 统计

keras ×1

python ×1

tensorflow ×1

valueerror ×1