Pass data to CNN with multiple outputs in keras For some reason am I getting an uexpected output dimension for my classification network. 

The network has 18 inputs of shape (45,5,3) - data formatted as (samples,45,5,3)

And the output is a vector of length 15 - one class for each third of 45.  The extracted classes comes from a pool of 145 classes. - data formatted as (samples,15)

My network looks like this: 

#stride = 2
#dim = 40
#window_height = 5
#splits = ((40-5)+1)/2 = 18

kernel_number = int(math.ceil(splits))
list_of_input = [Input(shape = (45,5,3)) for i in range(splits)]
list_of_conv_output = []
list_of_max_out = []
for i in range(splits):
    list_of_conv_output.append(Conv2D(filters = kernel_number , kernel_size = (int(splits-3),3))(list_of_input[i]))
    list_of_max_out.append((MaxPooling2D(pool_size=((2,2)))(list_of_conv_output[i])))

merge = keras.layers.concatenate(list_of_max_out)
print merge.shape
reshape = Reshape((15,324))(merge)

dense1 = Dense(units = 1000, activation = 'relu',    name = "dense_1")(reshape)
dense2 = Dense(units = 1000, activation = 'relu',    name = "dense_2")(dense1)
dense3 = Dense(units = 145 , activation = 'softmax', name = "dense_3")(dense2)
model = Model(inputs = list_of_input ,outputs = dense3)


But for some reason am I getting an error when I passing my output data. 
It is currently stored as numpy.ndarray of shape (16828,15) and I get an value error stating: 

Error when checking model target: expected dense_3 to have 3 dimensions, but got array with shape (16828, 15)


Why is it expecting 3 dim rather than 2 dim?

The model summary clearly indicates that the output dim is (15,145) as I also would expect?  15 classes from a pool of 145 classes. right?

Model summary: 
https://pastebin.com/27YTQW2m
The first dimension is always the sample index. In the model summary this is written as None, so your last output (None, 15, 145) is 3D. 

The error message shows that your target data has dimension (:, 15), rather than the required (:, 15, 145) so you will have to reformat it.