英文:
Different results in different epochs
问题
为什么在使用多个时期时,即使在每个时期中使用相同的数据,我们也会获得不同的结果(权重)?每个时期中发生了什么?每个时期是否使用前一时期的权重?
英文:
Why we get different results(weights) while using multiple epochs also we use the same data in each epoch? What is happening in each epoch? Is each epoch use the previous weights?__________________________________________________________________________________________________________
答案1
得分: 2
在使用相同数据的情况下,每个时期获得的结果可能会有所不同。然而,这不是一个错误,而是随机机器学习模型的特性,即损失函数依赖于一个或多个随机变量。将这种随机性添加到模型中通常会导致更好的解决方案。由于权重的初始化和训练过程具有随机性质,因此您的损失函数将收敛到多个不同的局部极小值。
然而,如果损失函数的性质是凸的(这在像线性回归这样的算法中是成立的),任何随机性的引入都不会影响结果,因为损失函数始终会收敛到全局最小值。
英文:
In the case where the same data is being used, the results you get in each epoch may vary. This, however, is not a bug, but a feature of stochastic machine learning models i.e. models in which the loss function depends on one or more stochastic variables(random variables). Adding this randomness to a model often results in better solutions. Because of the random nature of the initialization of weights and the training procedure, your loss function will converge to several different local minima.
However, if the loss function is convex in nature(which is the case with algorithms like linear regression), the introduction of any randomness will not affect the result as the loss function will always converge at the global minima.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论