在神经网络中, 处理学习进程的程序称为训练算法. 有许多这样的训练算法, 并有不同的特点和效用.
在训练神经网络中, 算法的目的就是求出极值点, 在此之中, 有5大算法.
梯度下降法式最简单的训练算法, 它需要计算出梯度向量, 根据梯度向量以及当前的点和学习率计算出当前步长, 以此来向极值点更近一步, 经过多次迭代, 最终到达极值点.
我们知道, 一个简单的神经网络可以是这样的, 分为多个层, 输入层、隐藏层和输出层. 在层与层之间, 有权重 $w_{ij}^k$ , 表示第k层的第i个节点到下一层的第j个节点的权重. 再每一层, 都会有个激活函数, 用于归一化, 也可以说是计算该层节点的输出.
所谓正向传播, 就是依据这一过程由输入层一直延续到输出层.
梯度下降算法是寻找函数极小值点的迭代优化算法. 必须基于当前点的梯度(或近似梯度)方向的反方向进行规定步长距离进行迭代搜索, 以达到接近极小值的算法. 假如按梯度相同方向迭代搜索, 就会接近极大值, 称为梯度上升法.
原题链接:https://www.patest.cn/contests/pat-a-practise/1135
1135. Is It A Red-Black Tree (30)
There is a kind of balanced binary search tree named red-black tree
原题链接:https://www.patest.cn/contests/pat-a-practise/1134
1134. Vertex Cover (25)
A vertex cover of a graph is a set of vertices such that each edge
原题链接:https://www.patest.cn/contests/pat-a-practise/1133
1133. Splitting A Linked List (25)
Given a singly linked list, you are supposed to rearrange its elements
原题链接:https://www.patest.cn/contests/pat-a-practise/1132
1132. Cut Integer (20)
Cutting an integer means to cut a K digits long integer Z into two
原题链接:https://www.patest.cn/contests/pat-a-practise/1127
1127. ZigZagging on a Tree (30)
Suppose that all the keys in a binary tree are distinct positive integers
原题链接:https://www.patest.cn/contests/pat-a-practise/1126
1126. Eulerian Path (25)
In graph theory, an Eulerian path is a path in a graph which visits every edge
原题链接:https://www.patest.cn/contests/pat-a-practise/1125
1125. Chain the Ropes (25)
Given some segments of rope, you are supposed to chain them into one rope.