且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Keras模型精度未提高

更新时间:2023-12-02 21:56:46

您可以尝试以下步骤:

  1. 使用均方误差损失函数.
  2. 使用 Adam ,这将帮助您以较低的学习率(例如0.0001或0.001)更快地收敛.否则,请尝试使用 RMSprop优化器.
  3. 使用默认正则化器.其实没有.
  4. 由于这是一项回归任务,因此在除输出层(包括输入层)之外的所有层中使用像ReLU这样的激活功能.在输出层中使用线性激活.
  5. 如@pooyan的评论中所述,标准化功能.请参见此处.甚至尝试标准化功能.使用最适合的套房.
  1. Use mean squared error loss function.
  2. Use Adam which will help you converge faster with low learning rate like 0.0001 or 0.001. Otherwise, try using the RMSprop optimizer.
  3. Use the default regularizers. That is none actually.
  4. Since this is a regression task, use activation function like ReLU in all the layers except the output layer ( including the input layer ). Use linear activation in output layer.
  5. As mentioned in the comments by @pooyan , normalize the features. See here. Even try standardizing the features. Use whichever suites the best.