Chapter 8 parameterized learning
- hinge loss function
- a multi-class SVM loss example
使用动物数据集,labels = [‘cat’,‘dog’,and panada] - 交叉熵损失函数:give you probabilities for each class label while hinge loss gives you the margin(边际分数?)
- softmax classifier : Logistic regression的推广
如何解释? 将这些scores 视为每一个类标签的非标准化log可能性
计算整个数据集的交叉熵损失通过平均实现
第一列表示 the output of scoring function
第二列表示:将得分函数进行幂计算,得到非标准化的概率(此时不再(0,1)范围内)
第三列表示:标准化概率,将每一个单独的未归一化的概率除以所有未归一化的概率和
第四列:所有概率取负,然后取对数,得到交叉熵损失值
Optimization Methods and Regularization
- epochs(通俗解释:our learning algorithm has seen each of the training data points N times)
- 梯度下降的伪代码
迭代终止条件:
1 a specified number of epochs has passed
2. our loss has become sufficiently low or training accuracy satisfactory high
3. loss has not imporved in M subsequent spochs
14 LeNet: Recognizing Handwritten Digits
- the LeNet Architecture: INPUT => CONV => TANH => POOL => CONV => TANH => POOL =>
FC => TANH => FC
The LeNet architecture consists of two series of CONV => TANH => POOL layer sets
followed by a fully-connected layer and softmax output
再复习一下卷积操作的相关参数
state-of-the-art CNNs in Keras
目前现有的卷积神经网络包括:
VGG16
VGG19
ResNet50
Inception V3
Xception
通常针对于“我没有昂贵的GPU。我该如何使用这些大规模的深度学习网络呢?这些网络已经在比我们在本书中研究的数据集更大的数据集上进行了预先培训。”
实际模型的大小: 在第8章节“参数学习”的主要两点:
- 定义一个机器学习模型,在训练过程中学习输入数据模式(需要我们花费更多的时间在训练过程),但是测试过程会很快
- 获得一个可以使用少量参数定义的模型,这些参数可以很容易地表示网络,而不管训练大小。
因此,我们实际模型的大小通常是一个函数的参数,而不是训练数据的数量。
We could train a very deep CNN (such as VGG or ResNet) on a dataset of 1 million images or a
dataset of 100 images – but the resulting output model size will be the same because model size is
determined by the architecture that we choose.
-
VGG16 and VGG19
VGG家族的神经网络特征是使用3*3的filter 卷积层随着深度的层架,逐层堆叠在一起。对输入图像的缩小由max pooling控制。两个全连接层包含4096个结点,最后是一个softmax
VGG的两个主要缺点 -
训练速度非常慢
-
网络权重本身相当大(由于其深度和全连接点的数量)
-
List item
-
ResNet
-
Inception V3
包括多级特征提取器