I want to use 3CNN
with 3GRU
layers. Here is the architecture:
layer_a = Input(shape
GRU layers need the following dimension (batch_size, seq_len, dim_per_seq) also it returns (batch_siz, number_of_neurons) so in order to put 2 GRU after each other, the first GRU layer need to set the parameter return_sequences=True.
Also, when building keras models it's always a good idea to use model.summary()(just build part of the model before the erroe appears) to debug. Often the problem lies in an unexpected shape.
Your architecture is not suited for using GRU layers at all. First you can't flatten the tensors because this will destroy your sequence like structure. This will make concatenating the layers impossible. You could conv and pool your tree layers layer_t, layer_tt and layer_ttt to the same second dimension (should be bigger then 1). This way you could concatenate the last dimension and get a tensor with a sequence like shape to put into a gru layer.