Keras中的图形断开问题

Keras中的图形断开问题,keras,Keras,我希望用Keras函数API实现这个架构。我对这一点还不熟悉,下面是我目前的代码(在连接输入时遇到了困难) 我得到这个错误: 图形已断开连接:无法获取张量的值 在“input_64”层的张量(“input_64:0”,shape=(?,1),dtype=float32)。 访问以下以前的层时没有问题:[] 我猜问题源于我张量的大小。。。但是我现在不知道如何调试这种代码。在创建Keras模型实例时,应该向模型传递所有输入的列表。您在代码中使用的变量concatenated不包含输入,而是包含某些层

我希望用Keras函数API实现这个架构。我对这一点还不熟悉,下面是我目前的代码(在连接输入时遇到了困难)

我得到这个错误:

图形已断开连接:无法获取张量的值 在“input_64”层的张量(“input_64:0”,shape=(?,1),dtype=float32)。 访问以下以前的层时没有问题:[]


我猜问题源于我张量的大小。。。但是我现在不知道如何调试这种代码。

在创建Keras
模型
实例时,应该向模型传递所有输入的列表。您在代码中使用的变量
concatenated
不包含输入,而是包含某些层的输出。此外,您不应该连接输入,而应该简单地使用列表

以下代码应该可以工作:

inputs = [
    input_quarter_hour,
    input_day_of_week,
    input_week_of_year,
    input_client_ids,
    input_taxi_ids,
    input_stand_ids,
    coords_in
]
model = Model(inputs=inputs, outputs=out)
inputs = [
    input_quarter_hour,
    input_day_of_week,
    input_week_of_year,
    input_client_ids,
    input_taxi_ids,
    input_stand_ids,
    coords_in
]
model = Model(inputs=inputs, outputs=out)