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
vision-transformers-cifar10_pytorch
Commits
328ab85c
Commit
328ab85c
authored
Aug 15, 2024
by
dcuai
Browse files
更换dtk24.04.1镜像
parent
0725fd45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
101 deletions
+106
-101
README.md
README.md
+106
-101
No files found.
README.md
View file @
328ab85c
# Vision-Transformers-cifar10
_pyTorch
# Vision-Transformers-cifar10
## 论文
## 论文
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale`
`An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale`
-
https://arxiv.org/abs/2010.11929
-
https://arxiv.org/abs/2010.11929
...
@@ -17,20 +17,24 @@ Vision Transformer先将图像用卷积进行分块以降低计算量,再对
...
@@ -17,20 +17,24 @@ Vision Transformer先将图像用卷积进行分块以降低计算量,再对
### Docker(方法一)
### Docker(方法一)
此处提供
[
光源
](
https://www.sourcefind.cn/#/service-details
)
拉取docker镜像的地址与使用步骤
此处提供
[
光源
](
https://www.sourcefind.cn/#/service-details
)
拉取docker镜像的地址与使用步骤
```
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:
1
.1
0
.0-
centos7.6-dtk-22
.1
0
-py3
8-latest
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:
2
.1.0-
ubuntu20.04-dtk24.04
.1-py3
.10
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video
-v /opt/hyhal:/opt/hyhal:ro
--name docker_name imageID bash
cd /path/workspace/
cd /path/workspace/
pip install pandas==1.5.3
pip install pandas==1.5.3
pip install numpy==1.24.3
```
```
### Dockerfile(方法二)
### Dockerfile(方法二)
此处提供dockerfile的使用方法
此处提供dockerfile的使用方法
```
```
cd ./docker
cd ./docker
docker build --no-cache -t yolov5:6.0 .
docker build --no-cache -t vision-transformers:latest .
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video --name docker_name imageID bash
docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --privileged=true --device=/dev/kfd --device=/dev/dri/ --group-add video -v /opt/hyhal:/opt/hyhal:ro --name docker_name imageID bash
pip install pandas==1.5.3
pip install numpy==1.24.3
```
```
### Anaconda(方法三)
### Anaconda(方法三)
...
@@ -38,10 +42,10 @@ docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --p
...
@@ -38,10 +42,10 @@ docker run -it -v /path/your_code_data/:/path/your_code_data/ --shm-size=32G --p
关于本项目DCU显卡所需的特殊深度学习库可从
[
光合
](
https://developer.hpccube.com/tool/
)
开发者社区下载安装。
关于本项目DCU显卡所需的特殊深度学习库可从
[
光合
](
https://developer.hpccube.com/tool/
)
开发者社区下载安装。
```
```
DTK驱动:dtk2
2.10
DTK驱动:dtk2
4.04.1
python:python3.
8
python:python3.
10
torch:
1
.10
torch:
2
.1
.
0
torchvision:0.1
0
.0
torchvision:0.1
6
.0
```
```
`Tips:以上dtk驱动、python、paddle等DCU相关工具版本需要严格一一对应`
`Tips:以上dtk驱动、python、paddle等DCU相关工具版本需要严格一一对应`
...
@@ -49,6 +53,7 @@ torchvision:0.10.0
...
@@ -49,6 +53,7 @@ torchvision:0.10.0
```
```
pip install -r requirements.txt
pip install -r requirements.txt
pip install pandas==1.5.3
pip install pandas==1.5.3
pip install numpy==1.24.3
```
```
## 数据集
## 数据集
...
@@ -67,7 +72,7 @@ pip install pandas==1.5.3
...
@@ -67,7 +72,7 @@ pip install pandas==1.5.3
│ ├── readme.html
│ ├── readme.html
│ └── test_batch
│ └── test_batch
```
```
**tips:请注意在程序中设置数据集路径时,应该设置cifar-10-batches-py的上一级目录,否则会报错找不到文件**
**tips:请注意在程序中设置数据集路径时,应该设置cifar-10-batches-py的上一级目录,
默认是放在data文件夹下,
否则会报错找不到文件**
## 训练
## 训练
### 单机多卡
### 单机多卡
...
...
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