深度神经网络 - 要调整的参数顺序
Deep Neural Network - Order of the Parameters to tune
我是 DNN 领域的新手,我受够了在 DNN 中调整超参数和其他参数,因为有很多参数需要调整,这就像没有计算机帮助的多变量分析。由于 DNN 内部的变量数量巨大,人类如何才能使用 DNN 实现任务的最高精度。我们如何知道使用 DNN 可以获得什么样的准确度,或者我必须放弃 DNN?我搞不清楚了。感谢帮助。
我遇到的主要问题:
1. What are the limits of DNN / when we have to give up on DNN
2. What is the proper way of tunning without missing good parameter values
这是我通过学习该领域的理论得到的总结。如果我错了或被误解了,将不胜感激。你可以添加我遗漏的任何内容。根据我的了解按重要性排序。
过度拟合 -
1. reduce the number of layers
2. reduce the number of nodes of layers
3. add regularizers (l1/ l2/ l1-l2) - have to decide the factors
4. add dropout layers and -have to decide the dropout factor
5. reduce batch size
6. stop earlier
欠拟合
1. increase the number of layers
2. increase number of nodes of layers
3. Add different types of layers (Conv, LSTM, ...)
4. add learning rate decay (decide the type and parameters for the type)
5. reduce the learning rate
除了一般我们可以做的,
1. number of epochs (by seeing what is happening while model training)
2. Adjust Learning Rate
3. batch normalization -for fast learning
4. initializing techniques (zero/ random/ Xavier / he)
5. different optimization algorithms
自动调整方法
- Gridsearchcv - but for this, we have to choose what we want to change and it takes a lot of time.
简短回答:您应该多试验!
长答案:一开始,您可能会对大量可以调整的旋钮感到不知所措,但您会逐渐变得有经验。要获得关于如何调整模型的超参数的一些直觉,一种非常快速的方法是尝试复制其他研究人员发表的内容。通过复制结果(并尝试改进最先进的技术),您可以获得关于深度学习的直觉。
我个人在调整模型的超参数时没有遵循特定的顺序。相反,我尝试实现一个肮脏的模型并尝试改进它。例如,如果我发现验证准确性出现超调,这可能表明模型在最佳点附近反弹,我将学习率除以 10,看看结果如何。如果我看到模型开始过度拟合,我会使用提前停止来保存过度拟合之前的最佳参数。我还研究了 dropout rates 和 weight decay 以找到它们的最佳组合,以便在保持正则化效果的同时使模型足够适合。等等。
要纠正您的一些假设,添加不同类型的层不一定会帮助您的模型避免过度拟合。此外,有时(尤其是在使用迁移学习时,这是当今的趋势),您不能简单地向神经网络添加卷积层。
假设您正在处理计算机视觉任务,数据增强是另一种有用的方法,可以增加可用数据量来训练您的模型并执行其性能。
另请注意,Batch Normalization 也具有正则化效果。 Weight Decay 是另一种广泛使用的 l2 正则化实现。
另一种可以改进神经网络训练的有趣技术是用于学习率和动量(如果适用)的单周期策略。查看本文:https://doi.org/10.1109/WACV.2017.58
我是 DNN 领域的新手,我受够了在 DNN 中调整超参数和其他参数,因为有很多参数需要调整,这就像没有计算机帮助的多变量分析。由于 DNN 内部的变量数量巨大,人类如何才能使用 DNN 实现任务的最高精度。我们如何知道使用 DNN 可以获得什么样的准确度,或者我必须放弃 DNN?我搞不清楚了。感谢帮助。
我遇到的主要问题:
1. What are the limits of DNN / when we have to give up on DNN
2. What is the proper way of tunning without missing good parameter values
这是我通过学习该领域的理论得到的总结。如果我错了或被误解了,将不胜感激。你可以添加我遗漏的任何内容。根据我的了解按重要性排序。
过度拟合 -
1. reduce the number of layers
2. reduce the number of nodes of layers
3. add regularizers (l1/ l2/ l1-l2) - have to decide the factors
4. add dropout layers and -have to decide the dropout factor
5. reduce batch size
6. stop earlier
欠拟合
1. increase the number of layers
2. increase number of nodes of layers
3. Add different types of layers (Conv, LSTM, ...)
4. add learning rate decay (decide the type and parameters for the type)
5. reduce the learning rate
除了一般我们可以做的,
1. number of epochs (by seeing what is happening while model training)
2. Adjust Learning Rate
3. batch normalization -for fast learning
4. initializing techniques (zero/ random/ Xavier / he)
5. different optimization algorithms
自动调整方法
- Gridsearchcv - but for this, we have to choose what we want to change and it takes a lot of time.
简短回答:您应该多试验!
长答案:一开始,您可能会对大量可以调整的旋钮感到不知所措,但您会逐渐变得有经验。要获得关于如何调整模型的超参数的一些直觉,一种非常快速的方法是尝试复制其他研究人员发表的内容。通过复制结果(并尝试改进最先进的技术),您可以获得关于深度学习的直觉。
我个人在调整模型的超参数时没有遵循特定的顺序。相反,我尝试实现一个肮脏的模型并尝试改进它。例如,如果我发现验证准确性出现超调,这可能表明模型在最佳点附近反弹,我将学习率除以 10,看看结果如何。如果我看到模型开始过度拟合,我会使用提前停止来保存过度拟合之前的最佳参数。我还研究了 dropout rates 和 weight decay 以找到它们的最佳组合,以便在保持正则化效果的同时使模型足够适合。等等。
要纠正您的一些假设,添加不同类型的层不一定会帮助您的模型避免过度拟合。此外,有时(尤其是在使用迁移学习时,这是当今的趋势),您不能简单地向神经网络添加卷积层。
假设您正在处理计算机视觉任务,数据增强是另一种有用的方法,可以增加可用数据量来训练您的模型并执行其性能。
另请注意,Batch Normalization 也具有正则化效果。 Weight Decay 是另一种广泛使用的 l2 正则化实现。
另一种可以改进神经网络训练的有趣技术是用于学习率和动量(如果适用)的单周期策略。查看本文:https://doi.org/10.1109/WACV.2017.58