henryliangt / usyd

0 stars 0 forks source link

5318 W7 #14

Open henryliangt opened 1 year ago

henryliangt commented 1 year ago

artificial neuron - by Mcculloch and Pitts 1943 Perceptrons 感知器 by Rosenblatt 1958 backpropagation 反向传播 1974 feedforward deep feedforward neural networks - modern techniques

Steepest gradient descent 最陡梯度下降 stochastic gradient descent (SGD) 随机梯度下降

henryliangt commented 1 year ago

usually how many hidden layers are we running? what are the current maximum layers? Are the layers related to attributes or other data aspects? Do we consider this NN method as non-linear? or other name ?

henryliangt commented 1 year ago

image

henryliangt commented 1 year ago

Epoch - one pass through the whole training set – this means that: • training example 1 is passed, the perceptron output is computed and the weights are changed, then the next example is passed etc. – repeat for all training examples)

henryliangt commented 1 year ago

1个epoch指用训练集中的全部样本训练一次,此时相当于batchsize 等于训练集的样本数。

什么是Epoch?

答:epoch数是一个超参数,它定义了学习算法在整个训练数据集中的工作次数。一个Epoch意味着训练数据集中的每个样本都有机会更新内部模型参数。Epoch由一个或多个Batch组成, 具有一批的Epoch称为批量梯度下降学习算法。您可以将for循环放在每个需要遍历训练数据集的epoch上,在这个for循环中是另一个嵌套的for循环,它遍历每批样本,其中一个批次具有指定的“批量大小”样本数。

当一个完整的数据集通过了神经网络一次并且返回了一次,这个过程称为一次epoch。然而,当一个epoch对于计算机而言太庞大的时候,就需要把它分成多个小块。

为什么要使用多于一个epoch?

在神经网络中传递完整的数据集一次是不够的,而且我们需要将完整的数据集在同样的神经网络中传递多次。但请记住,我们使用的是有限的数据集,并且我们使用一个迭代过程即梯度下降来优化学习过程。如下图所示。因此仅仅更新一次或者说使用一个epoch是不够的。

随着epoch数量增加,神经网络中的权重的更新次数也在增加,曲线从欠拟合变得过拟合。

几个epoch才是合适的呢?

不幸的是,这个问题并没有正确的答案。对于不同的数据集,答案是不一样的。但是数据的多样性会影响合适的epoch的数量。比如,只有黑色的猫的数据集,以及有各种颜色的猫的数据集。

epochs 数量传统上很大,通常是数百或数千,允许学习算法运行直到模型的误差被充分地最小化了。您可能会看到文献和教程设置为10,100,500,1000和更大的时期数量的示例。通常创建线图,其显示沿x轴的时间以及模型在y轴上的误差或技能。这些图有时被称为学习曲线。这些图可以帮助诊断模型是否已经过度学习,学习不足或者是否适合训练数据集。

henryliangt commented 1 year ago

It doesn’t try to find an “optimal” line, it will simply stop when a separating line is found ??

how to we have a maximized result ?

henryliangt commented 1 year ago

A 2-layer perceptron can solve the XOR problem!

How do we avoid the overfitting? Is it the NNs avoid the overfitting? or the data size ?

henryliangt commented 1 year ago

The transfer function needs to be differentiable ?? • Most widely used transfer function: sigmoid

henryliangt commented 1 year ago

By defining an error function and using the gradient descent algorithm to calculate it

henryliangt commented 1 year ago

When calculate it between layers, do we only chang the weight: W ? are we going to change b ?

henryliangt commented 1 year ago

arbitrary , 随意的 , momentum term in the weight update equation. 权重更新方程中的动量项。

vanish gradient problem 梯度消失问题 diminishing gradients, 递减梯度, slow convergence, 收敛慢,