I have trained a sequential model with keras for MNIST dataset and this is the code I've used.
# Create the model
model = Sequential()
# Add the first hidden layer
model.add(Dense(50, activation='relu', input_shape = (X.shape[1],)))
# Add the second hidden layer
model.add(Dense(50, activation='relu'))
# Add the output layer
model.add(Dense(10, activation = 'softmax'))
# Compile the model
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics = ['accuracy'])
# Fit the model
model.fit(X, y, validation_split=.3)
Output:
Train on 1750 samples, validate on 750 samples
1750/1750 [==============================] - 0s - loss: 0.1002 - acc: 0.9811 - val_loss: 0.3777 - val_acc: 0.8800
Can you explain what is loss, acc , val_loss, val_acc? How can I know my model performance from these metrics in output. Please explain if possible.