Error When Checking Target: Expected Dense_ To Have 3 Dimensions, But Got Array With Shape (100, 4)
I have a network with 2 inputs and 4 outputs. I have built an LSTM model with time step =5. import numpy as np import tensorflow as tf from keras.models import Sequential from kera
Solution 1:
Try this:
model.add(keras.layers.LSTM(units = 50, input_shape=(X.shape[1],X.shape[2])))
model.add(SeqSelfAttention(attention_width=50,attention_activation='linear',name='Attention'))
model.add(keras.layers.Dense(4, activation='linear'))
Post a Comment for "Error When Checking Target: Expected Dense_ To Have 3 Dimensions, But Got Array With Shape (100, 4)"