Skip to content

Commit

Permalink
feat: update gpu chip learn articles
Browse files Browse the repository at this point in the history
  • Loading branch information
HarleysZhang committed Oct 18, 2022
1 parent 888a4b6 commit 8c7f3f8
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 8 deletions.
Binary file added .DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- [5,结论](#5结论)
- [6,代码解读](#6代码解读)
- [参考资料](#参考资料)

## 摘要
> `CSPNet` 是作者 `Chien-Yao Wang``2019` 发表的论文 `CSPNET: A NEW BACKBONE THAT CAN ENHANCE LEARNING CAPABILITY OF CNN`。也是对 `DenseNet` 网络推理效率低的改进版本。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[toc]

# MobileNet v1 论文详解

> `MobileNet` 论文的主要贡献在于提出了一种**深度可分离卷积架构(DW+PW 卷积)**,先通过理论证明这种架构比常规的卷积计算成本(`Mult-Adds`)更小,然后通过分类、检测等多种实验证明模型的有效性。
Expand Down Expand Up @@ -53,11 +55,12 @@ Figure 4 中的“极限” Inception 模块与本文的主角-深度可分离

## 2、MobileNets 结构

### depthwise separable convolutions
### 2.1,深度可分离卷积

`MobileNets` 是谷歌 2017 年提出的一种高效的移动端轻量化网络,其核心是深度可分离卷积`depthwise separable convolutions`(深度可分离卷积) 的核心思想是将一个完整的卷积运算分解为两步进行,分别为 Depthwise Convolution(`DW` 卷积) 与 Pointwise Convolution(`PW` 卷积)。深度可分离卷积的计算步骤和滤波器尺寸如下所示。
`MobileNets` 是谷歌 2017 年提出的一种高效的移动端轻量化网络,其核心是深度可分离卷积`depthwise separable convolutions`),深度可分离卷积的核心思想是将一个完整的卷积运算分解为两步进行,分别为 Depthwise Convolution(`DW` 卷积) 与 Pointwise Convolution(`PW` 卷积)。深度可分离卷积的计算步骤和滤波器尺寸如下所示。

![深度可分离卷积的计算步骤](../../data/images/mobilenetv1/深度可分离卷积的计算步骤.png)

![滤波器尺寸](../../data/images/mobilenetv1/滤波器尺寸.png)

#### Depthwise 卷积
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ShuffleNet v2 论文详解

> 近期在研究轻量级 backbone 网络,我们所熟悉和工业界能部署的网络有 `MobileNet V2``ShuffleNet V2``RepVGG` 等,本篇博客是对 `ShuffleNet v2` 论文的个人理解分析。本文的参考资料是自己对网络上资料进行查找和筛选出来的,质量相对较高、且对本文有参考意义的文章。**`ShuffleNet v2` 论文最大的贡献在于看到了 GPU 访存带宽(内存访问代价 MAC)对于模型推理时间的影响,而不仅仅是模型复杂度,也就是 `FLOPs` 和参数量 `Params` 对于推理时间的影响,并由此提出了 `4` 个轻量级网络设计的原则和一个新颖的 卷积 block 架构-ShuffleNet v2**
> 近期在研究轻量级 backbone 网络,我们所熟悉和工业界能部署的网络有 `MobileNet V2``ShuffleNet V2``RepVGG` 等,本篇博客是对 `ShuffleNet v2` 论文的个人理解分析。本文的参考资料是自己对网络上资料进行查找和筛选出来的,质量相对较高、且对本文有参考意义的文章。`ShuffleNet v2` 论文最大的贡献在于看到了 GPU 访存带宽(内存访问代价 MAC)对于模型推理时间的影响,而不仅仅是模型复杂度,也就是 `FLOPs` 和参数量 `Params` 对于推理时间的影响,并由此提出了 `4` 个轻量级网络设计的原则和一个新颖的 卷积 block 架构-ShuffleNet v2。
## 摘要

Expand Down Expand Up @@ -105,6 +105,7 @@ $$
论文使用 `ResNet` 的 "bottleneck" 单元进行实验,其是由 $1 \times 1$ 卷积、然后是$3 \times 3$ 卷积,最后又是 $1 \times 1$ 卷积组成,并带有 `ReLU``shortcut` 连接,其结构图如下图所示。在论文的实验中,删除 `ReLU``shortcut` 操作,表 4 报告了不同变体 "bottleneck" 的运行时间。我们观察到,在删除 ReLU 和 shortcut 后,在 GPU 和 CPU 平台都取得了 `20%` 的加速。

![bottleneck](../../data/images/shufflenetv2/bottleneck.png)

![表4](../../data/images/shufflenetv2/表4.png)

**结论和讨论**。根据上诉 4 个指导原则和经验研究,我们得出高效的网络结构应该满足:
Expand Down
16 changes: 12 additions & 4 deletions 6-computer_vision/计算机视觉知识点汇总.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Caffe 框架](#caffe-框架)
- [编程语言](#编程语言)
- [模型部署](#模型部署)
- [GPU 芯片](#gpu-芯片)
- [AI 芯片](#ai-芯片)
- [内存优化](#内存优化)
- [关于科研和研发](#关于科研和研发)
Expand Down Expand Up @@ -54,7 +55,7 @@
5. [CUDA GEMM 理论性能分析与 kernel 优化](https://zhuanlan.zhihu.com/p/441146275)
6. [OpenPPL 中的卷积优化技巧](https://zhuanlan.zhihu.com/p/450310581):概述总结类文章,无代码,非专注时刻也能阅读。
7. [【张先轶】BLISlab学习优化矩阵乘。第一课](https://www.bilibili.com/video/BV1c94y117Uw/?vd_source=4ab49101e323bf3a37e7b81812524444)

8. [矩阵乘法与 SIMD](https://jcf94.com/2021/08/28/2021-08-28-simd/)
> `Winograd` 是一种快速卷积算法,适用于小卷积核,可以减少浮点乘法的次数。
## 经典卷积网络
Expand Down Expand Up @@ -146,13 +147,16 @@
5. [深度学习模型转换与部署那些事(含ONNX格式详细分析)](https://bindog.github.io/blog/2020/03/13/deep-learning-model-convert-and-depoly/)
6. [ONNX初探](https://mp.weixin.qq.com/s/H1tDcmrg0vTcSw9PgpgIIQ)

## GPU 芯片

1. [一文读懂 GPU 的发展历程](https://juejin.cn/post/7125824952342675464)
2. [CPU、GPU、NPU等芯片架构、特点研究](https://www.cnblogs.com/liuyufei/p/13259264.html)
3. [什么是异构并行计算?CPU与GPU的区别是什么?](http://imgtec.eetrend.com/blog/2019/100046756.html)

## AI 芯片

1. [看懂芯片原来这么简单(二):AI为什么聪明?什么是华为自研架构NPU?](https://mp.weixin.qq.com/s/OfWsbV6OIZ39t3944nUhWg)
2. [【专利解密】如何提高AI资源利用率? 华为卷积运算芯片](https://aijishu.com/a/1060000000144539)
3. [从GTX到RTX NVIDIA GPU架构的变迁史](https://news.mydrivers.com/1/624/624524.htm)
4. [CPU、GPU、NPU等芯片架构、特点研究](https://www.cnblogs.com/liuyufei/p/13259264.html)
5. [什么是异构并行计算?CPU与GPU的区别是什么?](http://imgtec.eetrend.com/blog/2019/100046756.html)

## 内存优化

Expand Down Expand Up @@ -215,3 +219,7 @@
+ 大多数情况下,使用滑窗方法的计算性能还是无法和 `GEMM` 方法比较,但是一般当输入小于 $32\times 32$ 时,可以考虑采用滑窗的优化方式。
+ `Winograd` 是存在已久的性能优化算法,在大多数场景中,`Winograd` 算法都显示了较大的优势,其用更多的加法运算代替部分乘法运算,因为乘法运算耗时远高于加法运算。`Winograd` 适用于乘法计算消耗的时钟周期数大于加法运算消耗的时钟周期数的场景,且常用于 $3\times 3$ 卷积计算中。对于 `CPU`,一般来说,一次乘法计算消耗的时间是一次加法计算消耗时间的 `6` 倍。
+ `FFT` 方法不适合卷积核较小的 `CNN` 模型。

11,下图展示了如何在英伟达 GPU 架构发展史以及单块 GPU 上纵向扩展以满足深度学习的需求(截止2020年)。
![英伟达 GPU 架构发展史](../data/images/计算机视觉知识点汇总/英伟达架构发展史截止到2020年.png)

Binary file added data/.DS_Store
Binary file not shown.
Binary file added data/article_cover/.DS_Store
Binary file not shown.
Binary file added data/article_cover/Backtracking_algorithm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/article_cover/dp.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/article_cover/neural_network_flops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/article_cover/贪心算法.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/images/.DS_Store
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8c7f3f8

Please sign in to comment.