斯坦福深度学习CS230课程cheatsheet学后总结笔记(1)

斯坦福深度学习CS230课程cheatsheet学后总结提纲1

Marshal Zheng
2019-04-12

Overview

传统CNN的结构:输入图像——卷积——池化——全连接

其中,卷积层和池化层可根据超参微调

TYPES OF LAYER
卷积层

使用滤波器filter执行卷积操作。其超参包括滤波器尺寸F和步幅(窗口移动长度)S,输出是特征映射或叫激活映射feature mapor activation map

池化层:

下采样操作,卷积层之后进行,空间不变性,最大池化(每一个池化操作选择当前view最大值),平均池化(每一个池化操作选择当前view平均值),最大池化广泛使用,平均池化在LeNet中使用

全连接层

一般在CNN的最后,用来优化目标

FILTER HYPERPARAMETERS
滤波器维度

F × F F \times F F×F大小,包含 C C C个通道,体积为 F × F × C F \times F \times C F×F×C,输入大小: I × I × C I \times I \times C I×I×C输出feature map大小: O × O × 1 O \times O \times 1 O×O×1,应用 K K K个滤波器,输出大小为: O × O × K O \times O \times K O×O×K

步幅S

每次操作窗口移动的像素

0-填充

增加 P P P个0到每个输入的边界,可以手动可以自动。

TUNING HYPERPARAMETERS
卷积层参数适应性(兼容)

O = I − F + P s t a r t + P e n d S + 1 O = \frac{I-F+P_{start}+P_{end}}{S}+1 O=SIF+Pstart+Pend+1

理解模型复杂性

以参数的数量来决定(一般)

容纳域

k k k层,第 k k k个激活映射,输入大小: R k × R k R_k \times R_k Rk×Rk,其中
R k = 1 + ∑ j = 1 k ( F j − 1 ) ∏ i = 0 j − 1 S i R_k = 1+\sum_{j=1}^{k}(F_j-1)\prod_{i=0}^{j-1}S_i Rk=1+j=1k(Fj1)i=0j1Si

COMMONLY USED ACTIVATION FUNCTIONS
ReLU(rectified(矫正) Linear unit)

目标要表示网络中的非线性,通常还有Leaky ReLU,ELU

Softmax:可以看成一个生成式的logistics函数,输入x的打分向量,输出概率p,定义为:
(2) p = { p 1 p 2 ⋯ p k } w h e r e p i = e x i ∑ j = 1 n e x j p = \left\{ \begin{matrix} p_1 \\ p_2 \\ \cdots \\ p_k \end{matrix} \right\}\tag{2} \quad where \quad p_i= \frac{e^{x_i}}{\sum_{j=1}^{n}e^{x_j}} p=p1p2pkwherepi=j=1nexjexi(2)

OBJECT DETECTION
模型类别-三种主要识别算法
  • 图像识别:传统CNN
  • 分类和目标位置识别:简单YOLO, R-CNN
  • 目标检测:YOLO, R-CNN
检测-两种主要方法
  • 约束框检测(BOUNDING BOX DETECTION)
  • 标志检测(LANDMARK DETECTION)
交并比(IoU

I o U ( B p , B a ) = B p ∩ B a B p ∪ B a IoU(B_p,B_a) = \frac{B_p \cap B_a}{B_p \cup B_a} IoU(Bp,Ba)=BpBaBpBa

锚盒

预测重叠的约束框(bounding boxes),允许网络同时预测多余一个框,每个框有一个给定的集合形状特点。

Non-max suppression

去除重叠的约束框。首先选择最有代表性的一个框,之后选出所有预测概率小于0.6的框。WHILE 仍然有框剩下,则执行以下步骤:

  • step 1:选出最大概率的框
  • step 2:抛弃所有IoU ≥ 0.5 \geq0.5 0.5的框
YOLO:YOU ONLY LOOK ONCE

算法步骤:

  • step 1:将输入图像分成 G × G G \times G G×G的栅格
  • step 2:对每个栅格单元,跑 CNN,预测小面格式的y

y = [ p c , b x , b y , b h , b w , c 1 , c 2 , ⋯   , c p ⎵ 重 复 k 次 , ⋯   ] T ∈ R G × G × k × ( 5 + p ) y = [\underbrace{p_c,b_x,b_y,b_h,b_w,c_1,c_2,\cdots,c_p}_{重复k次},\cdots]^T \in R^{G\times G\times k \times (5+p)} y=[k pc,bx,by,bh,bw,c1,c2,,cp,]TRG×G×k×(5+p)

其中, p c p_c pc是检测目标的可能性, b x , b y , b h , b w b_x,b_y,b_h,b_w bx,by,bh,bw是检测约束框的特征, c 1 , ⋯   , c p c_1,\cdots,c_p c1,,cpone-hot哪个p类被检测到的代表, k k k是锚框的数量

  • step 3:运行non-max suppression算法来去除潜在的重叠的约束框

remark: p c = 0 p_c = 0 pc=0的时候,网络没有检测目标,相应的预测 c x , b x c_x,b_x cx,bx也被忽略。

R-CNN:REGION WITH CONVOLUTIONAL NEURAL NETWORKS
  • 首先分割图像找到潜在相关的约束框
  • 然后,运行检测算法在这些约束框中找到最可能的目标

remark:虽然原始的算法计算代价很大,运算很慢,但是新的架构让算法运行更快乐,比如Fast R-CNN,和Faster R-CNN

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
比较简短的C语言教程,英文资料 1.0 Introduction 1.1 The main() Function 1.2 Include Files 1.3 Whitespace 1.4 The Preprocessor 1.4.1 The #define Directive 1.4.2 Comments 1.4.3 The #include Directive 1.4.4 The #ifdef/#else/#endif Directives 1.4.5 More Directives 1.4.6 Predefined Macros 2.0 Basic Data Types 2.1 Signed Integer Types 2.2 Unsigned Integer Types 2.3 Integer Overflow 2.4 Real Data Types 2.5 BCC32 Implementation 2.6 The void Type 3.0 Control Flow 3.1 The if/else/endif Statements 3.2 Compound Statements 3.3 Nested if Statements 3.4 The switch/case Statement 3.5 The for Statement 3.6 The while Statement 3.7 The do/while Statement 3.8 The break Statement 3.9 The continue Statement 3.10 The goto Statement 3.11 The return Statement 4.0 Expressions and Operators 4.1 Basic Arithmetic Operators 4.2 Promotion and Casting 4.3 More Arithmetic Operators 4.4 Assignment Operators 4.5 Bitwise Operators 4.6 Relational Operators 4.7 Logical Operators 4.8 The Conditional Operator The C Cheat Sheet Revision 1 Copyright ? 2000 Andrew Sterian iv 4.9 The Comma Operator 4.10 Operator Precedence and Association 5.0 Program Structure 5.1 Declaring Functions 5.2 Calling Functions 5.3 Local Variables 5.4 Global Variables 6.0 Advanced Data Types 6.1 Arrays 6.2 Structures 6.3 Pointers 6.4 Strings 6.4.1 String Pointers 6.4.2 String Operations 6.5 Enumerated Types 6.6 Bitfields 6.7 Unions 7.0 Advanced Programming Concepts 7.1 Standard I/O 7.1.1 Opening Files 7.1.2 Writing to File Pointers 7.1.3 Reading from File Pointers 7.1.4 The stdin/stdout/stderr Streams 7.2 Dynamic Memory Allocation 7.3 Memory Manipulation 7.4 Declaring New Types 7.5 Pointers to Functions 7.6 Command-Line Parameters 8.0 Multi-File Programs 8.1 Basic Concepts 8.2 Include Files as Interfaces 8.3 Object Files and Linking 8.4 The Details of the Compilation Process 9.0 The Standard C Library 9.1 Assertion Checking 9.2 Character Classification 9.3 Error Reporting 9.4 Buffer Manipulation 9.5 Non-Local Jumps 9.6 Event Signalling 9.7 Variable-Length Argument Lists 9.8 Miscellaneous Functions 9.9 String Handling 9.10 Time Functions 9.11 Floating-Point Math 9.12 Standard I/O 10.0 Tips, Tricks, and Caveats 10.1 Infinite Loops 10.2 Unallocated Storage 10.3 The Null Statement 10.4 Extraneous Semicolons 10.5 strcmp is Backwards 10.6 Unterminated Comments 10.7 Equality and Assignment 10.8 Assertion Checking 10.9 Error Checking 10.10 Programming Style 11.0 Differences between Java and C

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值