The train data: 897 ndarrays (5,1980 - float64) between 0-1. The labels are binary, 0 or 1.
regards
inco
trainX.shape Out[4]: (897, 5, 1980) trainY.shape Out[5]: (897, 1)Model: (original code here)
model = Sequential() model.add(Dense(1024, input_shape=(5,1980), activation="sigmoid")) model.add(Dense(512, activation="sigmoid")) model.add(Dense(2, activation="softmax")) INIT_LR = 0.01 EPOCHS = 75 opt = SGD(lr=INIT_LR) model.compile(loss="binary_crossentropy", optimizer=opt, metrics=["accuracy"]) H = model.fit(trainX, trainY, validation_data=(testX, testY), epochs=EPOCHS, batch_size=64)
model.summary() _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= dense_1 (Dense) (None, 5, 1024) 2028544 _________________________________________________________________ dense_2 (Dense) (None, 5, 512) 524800 _________________________________________________________________ dense_3 (Dense) (None, 5, 2) 1026 ================================================================= Total params: 2,554,370 Trainable params: 2,554,370 Non-trainable params: 0 _________________________________________________________________
Error:Error when checking target: expected dense_3 to have 3 dimensions, but got array with shape (897, 1)
Can sby help me?regards
inco