# Is this a valid way of training a model ? training loss in 1.1921e-07?

While training a keras model, i got this logs.

Epoch 49/50
2/2 [==============================] - 2s 943ms/step - loss: 1.1921e-07 - acc: 1.0000


As per my knowledge, i know that the ideal loss should be btw 1 to 10 (not sure) while training a model, but i faced this loss value while training in e-07.

Is this a valid training? Or I'm doing wrong somewhere ??

• Do I understand correctly that your training accuracy is 1.00? If so, then you are severely overfitting. Loss is just a sum of errors, and your model doesn't seem to be making any, therefore such a small value. – Vlad_Z Aug 1 '19 at 14:13
• Do you mean my model is Invalid for testing ? Will Severely overfitting cause wrong predictions ? – krishna rao gadde Aug 1 '19 at 14:21
• Usually 100% accuracy in training is an indicator that the model has become too focused on the training data (effectively memorizing it) and will not be able to generalize well. The model is only as good as the predictions it makes based on previously unseen data. What is your validation accuracy? – Vlad_Z Aug 1 '19 at 14:30
• My validation accuracy is bad. I can say its 50%. I have used this model for binary classification (Text classification). It is predicting only one class, all the time. I think that might be the training data to deal with.. But not sure !!! – krishna rao gadde Aug 1 '19 at 14:53
• Actually I have realized one thing (not sure if this is correct or not) The training dataset i have has two classes. Each class has a single file in it which has all the data. But when i split files (say 1000 files having some data each), and added them in my training Class, The loss and accuracy are different as shown below. Epoch 48/50 3108/3108 [==============================] - 18s 6ms/step - loss: 0.0904 - acc: 0.9865 They are not in e-07. I think this is the right way of training the model. Split the files in classes not to maintain a single big training file. -What say everyone – krishna rao gadde Aug 1 '19 at 15:25