concatenate层需要收到一个tensor列表,我用一个tensor列表bi_lstm_list输入显示正常,但是我用bi_lstm_list用append()添加了一个tensor得到list输入concatenate层显示该错误,type(bi_lstm_list.append(context_X))为Nonetype,先把con_list = [context_X, ]为列表再利用bi_lstm_list+con_list输入concatenate层错误解决
merge_layer1 = layers.Concatenate()(bi_lstm_list.append(context_X))
ValueError: Layer concatenate_1 was called with an input that isn’t a symbolic tensor. Received type: <class ‘NoneType’>. Full input: [None]. All inputs to the layer should be tensors.
con_list = [context_X, ]
merge_layer1 = layers.Concatenate()(bi_lstm_list+con_list)