跳至主要內容
Preliminaries

对数据的认识

机器学习就是对一个未知分布的数据建模的过程。无论是机器学习哪种学派,其都认为观察到的数据并不是凭空产生的,而是由一个潜在的、客观存在的数据生成过程所产生。这个数据生成过程可以用一个概率分布来描述。

例如抛硬币,会出现正面或反面,我们抛了kk次,得到kk个数据。这个结果就可以看作是由一个伯努利分布生成(采样)的。


RyanLee_ljx...大约 11 分钟ML
变分推断与VAE

隐变量

举一个例子(源于【隐变量(潜在变量)模型】硬核介绍):

观察下图,表面上我们观测到的数据是一堆点 x={x1,x2,,xn}x = \{x_1, x_2, \dots, x_n\},但实际上我们可以直观地发现这些点以某种概率采样自四个不同的分布(假设都是高斯分布)。而潜在变量 ziz_i 控制了 xix_i 从哪个分布中采样:ziN(μk,σk2)z_i \sim N(\mu_k, \sigma_k^2),其中 k=1,2,3,4k = 1, 2, 3, 4。设 σk\sigma_k 已知。于是,潜在变量 ziz_i 表示观测变量 xix_i 对应类别的序号。


RyanLee_ljx...大约 6 分钟ML
Attention Mechanism

This article will introduce a powerful technique in machine learning called Ateention Mechanism.

The core method of attention mechanism is to pay more attention to what we want. It allows model to weigh the importance of different parts of input dynamically rather than treating them equally. The model learns to assign higher weights to the most relevant elements.


RyanLee_ljx...大约 6 分钟ML
卷积

本节整理卷积方面基本概念

基本概念

  1. 卷积:卷积就是用一个可移动的窗口(卷积核),按一定步长,与图像对应元素进行点乘相加的操作。卷积本质上也是一种对数据维度的变换,提取图像的特征,相较于全连接层直接把图像展开成一个行向量,其能更好地捕获图像的空间特征,当然通过改变参数的形状,任何全连接层都能被转换为一个等价卷积层。

Convolution: Convolution is to use a movable window (convolution kernel) to perform a dot multiplication and addition operation with the corresponding elements of the image at a certain step size. Convolution is essentially a transformation of the data dimension to extract the features of the image. Compared with the fully connected layer that directly expands the image into a row vector, it can better capture the spatial features of the image. Of course, by changing the shape of the parameters, any fully connected layer can be converted into an equivalent convolution layer.


RyanLee_ljx...大约 3 分钟ML
Problem record of learning pytorch

1. torch.optim ———— scheduler

Scheduler is used to adjust learning rate.

torch.optim.lr_scheduler.LRScheduler provides several methods to adjust the learning rate based on the number of epochs. torch.optim.lr_scheduler.ReduceLROnPlateau allows dynamic learning rate reducing based on some validation measurements.


RyanLee_ljx...大约 2 分钟ML
机器学习

本节整理机器学习的基本问题

基本概念

magnitude: 幅度 order of magnitude:数量级 converge: 收敛 oscillate: 振荡 fit: 拟合 fine-tune: 调参 generalization ability:泛化能力 dimension: 量纲 deviation:偏离

一、绪论

  1. 什么是机器学习和深度学习? 机器学习是一种实现人工智能的方法。人工智能是想要达成的目标,而机器学习是想要达成目标的手段:希望机器通过学习的手段,可以跟人一样聪明。机器学习是研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构,使不断改善自身的性能。而深度学习,就是机器学习的其中一种方法。

  2. 机器学习流程? **表示 represent:**将数据对象进行特征(feature)化表示

    **训练 train:**给定一个数据样本集,从中学习出规律(模型),目标:该规律不仅适用于训练数据,也适用于未知数据(称为泛化能力)

    **测试 test:**对于一个新的数据样本,利用学到的模型进行预测

  3. 在机器学习中,学习率这种参数叫什么?学习率太大和太小的可能影响?

    学习率(learning rate)也叫步长,指更新参数步幅。表征了参数每次更新的幅度(represent the magnitude of parameter update)


RyanLee_ljx...大约 23 分钟ML