How to tell which Keras model is better?

前端 未结 2 1884
太阳男子
太阳男子 2021-01-30 02:28

I don\'t understand which accuracy in the output to use to compare my 2 Keras models to see which one is better.

Do I use the \"acc\" (from the training data?) one or t

2条回答
  •  梦谈多话
    2021-01-30 03:09

    You need to key on decreasing val_loss or increasing val_acc, ultimately it doesn't matter much. The differences are well within random/rounding errors.

    In practice, the training loss can drop significantly due to over-fitting, which is why you want to look at validation loss.

    In your case, you can see that your training loss is not dropping - which means you are learning nothing after each epoch. It look like there's nothing to learn in this model, aside from some trivial linear-like fit or cutoff value.

    Also, when learning nothing, or a trivial linear thing, you should a similar performance on training and validation (trivial learning is always generalizable). You should probably shuffle your data before using the validation_split feature.

提交回复
热议问题