Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Megatron-DeepSpeed-ViT_pytorch
Commits
2c975067
"vscode:/vscode.git/clone" did not exist on "56d0c44b37e62297adf91e7ef4392530a93debcb"
Commit
2c975067
authored
Oct 20, 2023
by
chenzk
Browse files
v1.2.4
parent
5082bb1e
Pipeline
#600
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
README.md
README.md
+11
-4
model.properties
model.properties
+1
-1
No files found.
README.md
View file @
2c975067
...
...
@@ -3,14 +3,19 @@
## 论文
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale`
-
https://arxiv.org/abs/2010.11929
## 模型结构
Vision Transformer先将图像用卷积进行分块以降低计算量,再对每一块进行展平处理变成序列,然后将序列添加位置编码和cls token,再输入多层Transformer结构提取特征,最后将cls tooken取出来通过一个MLP(多层感知机)用于分类。
<div
align=
center
>
<img
src=
"./doc/vit.png"
/>
</div>

## 算法原理
图像领域借鉴《Transformer is all you need!》算法论文中的Encoder结构提取特征,Transformer的核心思想是利用注意力模块attention提取特征:
<div
align=
center
>
<img
src=
"./doc/attention.png"
/>
</div>

## 环境配置
```
mv megatron-deepspeed-vit_pytorch megatron-deepspeed-vit # 去框架名后缀
...
...
@@ -99,12 +104,14 @@ sh examples/dspvit_1dcu.sh
sh examples/dspvit_1node.sh
```
## result

<div
align=
center
>
<img
src=
"./doc/classify.png"
/>
</div>
## 应用场景
### 算法类别
`图像分类`
### 热点应用行业
`制造,环
境
,医疗,气象`
`制造,环
保
,医疗,气象`
## 源码仓库及问题反馈
-
https://developer.hpccube.com/codes/modelzoo/megatron-deepspeed-vit_pytorch
## 参考资料
...
...
model.properties
View file @
2c975067
...
...
@@ -5,6 +5,6 @@ modelName=megatron-deepspeed-vit_pytorch
# 模型描述
modelDescription
=
基于transformer的图像分类算法
# 应用场景
appScenario
=
推理,训练,图像分类,制造,环
境
,医疗,气象
appScenario
=
推理,训练,图像分类,制造,环
保
,医疗,气象
# 框架类型
frameType
=
PyTorch
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment