INT305 题型整理

部署运行你感兴趣的模型镜像

gradient descent

1.

21

1)

2)

3)

4)

The gradient with respect to a variable should have the same shape as the variable

3.

 

 2.

4.

21,22

5.

The relationship between permutation modules and sorting modules: A permutation module is a certain reordering of X, while a sorting module is a special case of permutation (i.e., ordering in descending order). Therefore, the sorting module is a special case of the permutation module.

The relationship between linear modules and rotation modules: If W is a rotation matrix (an orthogonal matrix with a determinant of 1), then a linear module can represent a rotation module. Thus, the rotation module is a special case of the linear module.

Therefore, the sorting module is a special case of the permutation module, and the rotation module is a special case of the linear module.

From a theoretical perspective, if we disregard efficiency, the sorting module and the permutation module can be implemented using the same code. Similarly, the linear module and the rotation module can also share the same code, but additional constraints are required to ensure W is a rotation matrix.

6.

 7.

8.

SVM-hinge loss

1.

21

Concept 

1.

21,22,23

2.

3. 

4.

Decision Tree

information gain 信息熵

entropy

注意这里算的是样本比率!!!!!

P(y): 变量 Y 取值为 y 的概率。

The expected conditional entropy

Information Gain  信息增益

Information gain 𝐼𝐺 (𝑌| 𝑋) in 𝑌 due to 𝑋, or the mutual information of 𝑌 and 𝑋

If 𝑋 is completely uninformative about 𝑌: 𝐼𝐺 (𝑌|X) =0
If 𝑋 is completely informative about 𝑌: 𝐼𝐺 (𝑌|X) = H(Y)

1.

21

2.

22

A informative!

B not terribly informative

3.

4.

21

objective function construction

1.

21

 

CNN

input size(H,W)

Fliter size(FH, FW)

Outputsize(OH,OW)

padding P

stride S

channel C

The number of filters (also the number of output channels) K

output size

OH = (H+2P-FH)/S +1

OW = (W+2P-FW)/S +1

但是一般情况下其实input,output 和 filter 都是正方形的

so if H =W, FH = FW = F

O = (H + 2P -F)/S +1

parameters

(FH​×FW​×Cin​+1)×K + K

注意这里两个K只在有偏置项的时候加!

The number of parameters is determined by the filter size and the number of filters, regardless of the stride

1.

22

 

(FH​×FW​×Cin​+1)×K + K

注意这里两个K只在有偏置项的时候加!

(1*3*1)*1 = 3

1

2.

 23

3.

4.

GMM

2.

 23

 

您可能感兴趣的与本文相关的镜像

GPT-oss:20b

GPT-oss:20b

图文对话
Gpt-oss

GPT OSS 是OpenAI 推出的重量级开放模型,面向强推理、智能体任务以及多样化开发场景

### 卷积核 在CNN的一个卷积层中,卷积核的长、宽是人为指定的,长×宽被称为卷积核的尺寸,常用尺寸有3×3、5×5等。卷积核的深度与当前图像的深度(feature map的张数)相同,所以指定卷积核时,只需指定其长和宽两个参数。例如,原始图像层(输入层)中,若图像是灰度图像,其feature map数量为1,则卷积核的深度也就是1;若图像是RGB图像,其feature map数量为3,则卷积核的深度也就是3 [^1]。 卷积在图像处理领域应用广泛,像滤波、边缘检测、图片锐化等,都是通过不同的卷积核来实现的。在卷积神经网络中,通过卷积操作可以提取图片中的特征,低层的卷积层可以提取到图片的一些边缘、线条、角等特征,高层的卷积能够从低层的卷积层中学到更复杂的特征,从而实现图片的分类和识别 [^3]。 Pointwise卷积是一种特殊的卷积,只可以改变输入图像的通道数,不可以改变输入图像的大小,其利用1 * 1的卷积核对输入图像在channel方向上进行加权。具体设置为卷积核的通道数等于输入图像的通道数,卷积核的个数等于输出图像所需要的通道数,卷积核的尺寸为1 * 1 [^4]。 ### 损失函数 引用中未提及CNN框架中损失函数的内容。一般来说,在CNN中常用的损失函数有以下几种: - **交叉熵损失函数(Cross - Entropy Loss)**:常用于分类问题。对于多分类问题,softmax交叉熵损失函数会将模型的输出通过softmax函数转换为概率分布,然后与真实标签的概率分布计算交叉熵。公式如下: ```python import torch.nn as nn import torch # 定义交叉熵损失函数 criterion = nn.CrossEntropyLoss() # 模拟模型输出和真实标签 outputs = torch.randn(3, 5) # 假设批量大小为3,类别数为5 labels = torch.tensor([1, 0, 3]) # 真实标签 # 计算损失 loss = criterion(outputs, labels) ``` - **均方误差损失函数(Mean Squared Error Loss,MSE)**:常用于回归问题,计算模型预测值与真实值之间的平方误差的平均值。公式如下: ```python import torch.nn as nn import torch # 定义均方误差损失函数 criterion = nn.MSELoss() # 模拟模型输出和真实标签 outputs = torch.randn(3, 1) # 假设批量大小为3 labels = torch.randn(3, 1) # 真实标签 # 计算损失 loss = criterion(outputs, labels) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值