神经网络训练中一个时代的意义 [英] Meaning of an Epoch in Neural Networks Training

查看:104
本文介绍了神经网络训练中一个时代的意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在阅读如何在 pybrain 中构建ANN时,他们说:

while I'm reading in how to build ANN in pybrain, they say:

训练网络一些时间.通常你会设置一些东西 像这里的5,

Train the network for some epochs. Usually you would set something like 5 here,

trainer.trainEpochs( 1 )

我寻找的是什么意思,然后得出结论,我们使用一个时期的数据来更新权重.如果我选​​择以5个时期作为pybrain建议来训练数据,则该数据集将被分为5个子集,并且权重将最多更新5次.

I looked for what is that mean , then I conclude that we use an epoch of data to update weights, If I choose to train the data with 5 epochs as pybrain advice, the dataset will be divided into 5 subsets, and the wights will update 5 times as maximum.

我熟悉在线训练,每个样本数据或特征向量后都会更新权重,我的问题是如何确保5个纪元足以建立一个模型并设置权重?这种方式对在线培训有什么优势?在线培训中也使用了时代"一词,这是否意味着一个特征向量?

I'm familiar with online training where the wights are updated after each sample data or feature vector, My question is how to be sure that 5 epochs will be enough to build a model and setting the weights probably? what is the advantage of this way on online training? Also the term "epoch" is used on online training, does it mean one feature vector?

推荐答案

一个纪元由训练集中的一个完整训练周期组成.一旦看到集合中的每个样本,您就重新开始-标记第二个纪元的开始.

One epoch consists of one full training cycle on the training set. Once every sample in the set is seen, you start again - marking the beginning of the 2nd epoch.

这与批量或在线培训本身无关.批量处理意味着您在时代结束时(每次看到每个示例之后,即#epoch更新)一次进行更新,而您在每次之后进行在线更新 strong> sample (#samples * #epoch更新).

This has nothing to do with batch or online training per se. Batch means that you update once at the end of the epoch (after every sample is seen, i.e. #epoch updates) and online that you update after each sample (#samples * #epoch updates).

您不确定5个纪元或500个纪元是否足以收敛,因为它会因数据而异.当错误收敛或低于某个特定阈值时,您可以停止训练.这也进入了防止过度拟合的领域.您可以阅读提前停止

You can't be sure if 5 epochs or 500 is enough for convergence since it will vary from data to data. You can stop training when the error converges or gets lower than a certain threshold. This also goes into the territory of preventing overfitting. You can read up on early stopping and cross-validation regarding that.

这篇关于神经网络训练中一个时代的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆