连接具有不同形状的图层

时间:2020-01-19 20:50:48

标签: tensorflow keras neural-network conv-neural-network recurrent-neural-network

我有两个具有以下形状的层。

第1层:LSTM

df1 <- structure(list(Id = 1:5, Col1_ABC = c("Yes", "No", "Yes", "Yes", 
"No"), Col2_BCD = c("No", "No", "Yes", "No", "No"), Col3_CBD = c("No", 
"No", "Yes", "Yes", "No"), Col1_ABC_1 = c("Yes", "Yes", "No", 
NA, NA), Col2_BCD_1 = c("Yes", "No", "Yes", NA, NA), Col3_CBD_1 = c("No", 
"Yes", "No", NA, NA)), class = "data.frame", row.names = c(NA, 
-5L))

第2层:Conv2D->展平->重塑

K.int_shape(x)

(None, None, 500)

我需要将它们连接起来,但是出现以下错误。

ValueError:“连接”层需要具有匹配形状的输入 除了concat轴。得到了输入形状:[(无,无,500), (没有,1,2352)]

我正在使用Keras v2.1.4

0 个答案:

没有答案