Why I'm getting bad result with Keras vs random forest or knn?

前端 未结 2 481
一向
一向 2020-12-21 17:03

I\'m learning deep learning with keras and trying to compare the results (accuracy) with machine learning algorithms (sklearn) (i.e random fo

2条回答
  •  不思量自难忘°
    2020-12-21 17:53

    Adding some dropout might help you improve accuracy. See Tensorflow's documentation for more information.

    Essentially how you add a Dropout layer is just very similar to how you added those Dense() layers.

    model.add(Dropout(0.2)
    

    Note: The parameter '0.2 implies that 20% of the connections in the layer is randomly omitted to reduce the interdependencies between them, which reduces overfitting.

提交回复
热议问题