How to solve neural network accuracy become constant issue?

Home / Uncategorized / How to solve neural network accuracy become constant issue?

Question:
I am using some simple model:model = Sequential()

model.add(Dense(12, input_dim=len(allKeys), activation=’tanh’, kernel_initializer=’uniform’))
model.add(Dense(31, activation=’tanh’))
model.add(Dense(N, activation=’relu’))

model.compile(optimizer=’adam’,loss=’categorical_crossentropy’,metrics=[‘accuracy’])

model.fit(X, Y, epochs=500, batch_size=40)

X.shape (31, 147) Y.shape (31, 13)

the values in X are either 0 or some under lower than 1.0. Y, is sparse array, one column in one row is 1, the rest columns are 0.

The acc is always lower than 0.25. Most time it just 0.12. If I add dropout layer, I see the acc values change, but not above 0.25, most time just gave worse result.

Epoch 290/500 31/31 [==============================] – 0s – loss: 9.6283 – acc: 0.1290 Epoch 291/500 31/31 [==============================] – 0s – loss: 9.6283 – acc: 0.1290 Epoch 292/500 31/31 [==============================] – 0s – loss: 9.6283 – acc: 0.1290

Any suggestion to improve?


Answer:

Read more

Leave a Reply

Your email address will not be published. Required fields are marked *