How to avoid overfitting on a simple feed forward network

后端 未结 3 504
渐次进展
渐次进展 2021-02-02 18:32

Using the pima indians diabetes dataset I\'m trying to build an accurate model using Keras. I\'ve written the following code:

# Visualize training history
from k         


        
3条回答
  •  清歌不尽
    2021-02-02 18:42

    For a dataset like the Diabetes one you can use a much simpler network. Try to reduce the neurons in your second layer. (Is there a specific reason why you chose tanh as the activation there?).

    In addition you simply can add an EarlyStopping callback to your training: https://keras.io/callbacks/

提交回复
热议问题