Layer called with an input that isn't a symbolic tensor keras

前端 未结 3 1870
不知归路
不知归路 2021-02-18 14:48

I\'m trying to pass the output of one layer into two different layers and then join them back together. However, I\'m being stopped by this error which is telling me that my inp

3条回答
  •  逝去的感伤
    2021-02-18 15:51

    I know, documentation can be confusing, but Concatenate actually only requires "axis" as parameter, while you passed the layers. The layers need to be passed as argument to the result of it as follow:

    Line to modify:

    x = keras.layers.concatenate([book_out, char_out])

    How it should be:

    x = keras.layers.Concatenate()([book_out, char_out])

提交回复
热议问题