超参数如何取值
直接调优
根据经验对于超参数的重要性进行排序
- 学习率
- momentum 的β(~0.9);隐藏层的神经元数量;mini batch size
- 隐藏层的数量;学习率的衰减率
- adam 的β1(~0.9),β2(~0.999)Σ(10^-8)这三者一般固定,很少需要调试
数值选择上遵循随机取值和精确搜索的原则
随机取值可以快速找到影响较大的超参数,确定范围后,精确搜索可以进一步优化超参数,由粗糙到精细
借鉴已有其他领域模型,复用其参数进行测试评估
根据计算能力选择调试方式
1,如果计算能力有限,一次进行一个模型的训练调试,用时间换取效果
2,如果计算能力充足,一次同时进行多个模型的不同超参训练调试,用并行换取时间
batch归一化处理
基于对输入样本数据进行归一化处理可加速算法训练学习的原理,对隐层的输入数据也同样进行归一化处理,
可以降低前一层的数据计算结束变动对后一层计算的影响,降低前后层的联系,每一层都可以独立学习,从而加速算法的训练速度
Softmax regression
Softmax 算法是一种用于多分类任务的函数,通常应用于神经网络的输出层,以将网络的输出转换为概率分布。
它可以将一个未归一化的向量(即原始的网络输出)转换为一个归一化的概率分布,使得每个类别的概率值在 0 到 1 之间,并且所有类别的概率和为 1。
TensorFlow 框架学习
What you should remember: - Tensorflow is a programming framework used in deep learning - The two main object classes in tensorflow are Tensors and Operators. - When you code in tensorflow you have to take the following steps: - Create a graph containing Tensors (Variables, Placeholders …) and Operations (tf.matmul, tf.add, …) - Create a session - Initialize the session - Run the session to execute the graph - You can execute the graph multiple times as you’ve seen in model() - The backpropagation and optimization is automatically done when running the session on the “optimizer” object.