0
$\begingroup$

I have trained an ANN using Keras (Python3). However, I do not understand the training and validation loss graph. There's a big difference between the first and second training point.

  1. Is the graph of the training and validation accuracy correct?
  2. Why is there a big difference between first point and the rest of the points of the loss graph?
  3. How could I prevent the problem in Q1 (if wrong) and Q2?

Model:

model = Sequential()
model.add(Dense(5, input_shape=(9,), activation='relu'))
model.add(Dense(5, activation='relu'))
model.add(Dense(5, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.summary() 


model.compile(optimizer='Adam', 
              loss='binary_crossentropy',
              metrics=['accuracy'])

history = model.fit(X, y, 
                    epochs=25, 
                    batch_size=100, 
                    validation_split=0.2, 
                    shuffle=True, verbose=1)

Thank you.

Accuracy Graph

Loss Graph

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.