如何知道反向传播是否训练成功?

发布于 2024-12-28 01:03:03 字数 233 浏览 2 评论 0原文

我有一个人工智能项目,它使用反向传播神经网络。

它的训练时间约为 1 小时,已训练了所有 100 个输入中的 60-70 个输入。我的意思是,在反向传播的情况下,60-70 个输入是正确的。 (经过训练的输入数量在 60 到 70 之间移动)。

目前,已经完成了超过 10000 个 epoch,每个 epoch 花费了近 0.5 秒。

长期搁置如何知道神经网络能否训练成功? (或者它不能训练得更好?)

I have an AI project, which uses a Backpropagation neural network.

It is training for about 1 hour, and it has trained 60-70 inputs from all 100 inputs. I mean, 60-70 inputs are correct in the condition of Backpropagation. (the number of trained inputs is moving between 60 and 70).

And currently, more than 10000 epochs are completed, and each epoch is taking almost 0.5 seconds.

How to know if the neural network can be trained successfully if I leave it for a long time? (or it can't train better?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卷耳 2025-01-04 01:03:03

看看我对此问题的回答:神经网络中的训练集、验证集和测试集有什么区别?

你应该使用 3 组数据:

  • 训练
  • 验证
  • 测试

验证数据set 告诉你什么时候应该停止(正如我在另一个答案中所说):

验证数据集用于最大限度地减少过度拟合。你不
使用此数据集调整网络的权重,您只需
验证训练数据集的准确性是否有所提高
实际上,与未检测到的数据集相比,准确度有所提高
之前曾在网络上展示过,或者至少网络上没有
对其进行训练(即验证数据集)。 如果准确率超过
训练数据集增加,但准确性超过验证
数据集保持不变或减少,那么你就过度拟合了
神经网络,你应该停止训练。

验证的一个好方法是使用 10 倍(k 倍)交叉验证。此外,还有将数据集分为训练、验证和测试的特定“策略”。它本身就是一门科学,所以你也应该阅读它。

更新

这些资源可以让您更好地理解神经网络(这有点数学繁重,但请参阅下面的更多信息):

  1. 关于您对该错误的评论,我会向您指出一些资源, colinfahey.com/neural_network_with_back_propagation_learning/neural_network_with_back_propagation_learning_en.html" rel="nofollow noreferrer">http://www.colinfahey.com/neural_network_with_back_propagation_learning/neural_network_with_back_propagation_learning_en.html
  2. http://www.willamette.edu/~gorr/classes/cs449/linear2.html

Colin Fahey 文章的第 5.9 节对此进行了最好的描述:

后向误差传播公式:
使用以下公式计算神经网络输出处的误差值:

Error = (Output - Desired);  // Derived from: Output = Desired + Error;

根据神经元主体的输出和输出误差(由连接到神经元主体的链路指定)来调整神经元主体中的误差累积。
每个输出误差值通过以下方式对误差累加器产生影响:

ErrorAccumulator += Output * (1 - Output) * OutputError;

Check out my answer to this question: whats is the difference between train, validation and test set, in neural networks?

You should use 3 sets of data:

  • Training
  • Validation
  • Testing

The Validation data set tells you when you should stop (as I said in the other answer):

The validation data set is used to minimize overfitting. You're not
adjusting the weights of the network with this data set, you're just
verifying that any increase in accuracy over the training data set
actually yields an increase in accuracy over a data set that has not
been shown to the network before, or at least the network hasn't
trained on it (i.e. validation data set). If the accuracy over the
training data set increases, but the accuracy over then validation
data set stays the same or decreases, then you're overfitting your
neural network and you should stop training.

A good method for validation is to use 10-fold (k-fold) cross-validation. Additionally, there are specific "strategies" for splitting your data set into training, validation and testing. It's somewhat of a science in itself, so you should read up on that too.

Update

Regarding your comment on the error, I would point you to some resources which can give you a better understanding of neural networks (it's kinda math heavy, but see below for more info):

  1. http://www.colinfahey.com/neural_network_with_back_propagation_learning/neural_network_with_back_propagation_learning_en.html
  2. http://www.willamette.edu/~gorr/classes/cs449/linear2.html

Section 5.9 of Colin Fahey article describes it best:

Backward error propagation formula:
The error values at the neural network outputs are computed using the following formula:

Error = (Output - Desired);  // Derived from: Output = Desired + Error;

The error accumulation in a neuron body is adjusted according to the output of the neuron body and the output error (specified by links connected to the neuron body).
Each output error value contributes to the error accumulator in the following manner:

ErrorAccumulator += Output * (1 - Output) * OutputError;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文