Browse Source

update readme

pull/3/head
liuzx 2 years ago
parent
commit
22007f209e
5 changed files with 15 additions and 14 deletions
  1. +2
    -3
      gcu_mnist_example/README.md
  2. +2
    -2
      gpgpu_mnist_example/README.md
  3. +4
    -5
      gpu_mnist_example/README.md
  4. +2
    -2
      npu_mnist_example/README.md
  5. +5
    -2
      npu_mnist_example/train_multi_card.py

+ 2
- 3
gcu_mnist_example/README.md View File

@@ -1,4 +1,3 @@

# 如何在启智平台上进行模型调试和训练—GCU_手写数字识别示例

## 一 ,数据集及预训练模型准备
@@ -39,9 +38,9 @@ c2net_context = prepare()
##### 2,获取代码路径

```
code_path = c2net_context.code_path +"/" +"项目名"
code_path = c2net_context.code_path +"/" +"项目名".lower()
在本示例中代码路径为:
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example"
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example".lower()
```

##### 3,获取数据集路径


+ 2
- 2
gpgpu_mnist_example/README.md View File

@@ -38,9 +38,9 @@ c2net_context = prepare()
##### 2,获取代码路径

```
code_path = c2net_context.code_path +"/" +"项目名"
code_path = c2net_context.code_path +"/" + "项目名".lower()
在本示例中代码路径为:
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example"
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example".lower()
```

##### 3,获取数据集路径


+ 4
- 5
gpu_mnist_example/README.md View File

@@ -1,4 +1,3 @@

# 如何在启智平台上进行模型调试和训练—GPU_手写数字识别示例

## 一 ,数据集及预训练模型准备
@@ -12,9 +11,9 @@

> MnistDataset_torch.zip
>
> ├── test
> ├── test
>
> └── train
> └── train
>

##### 2,预训练模型说明:
@@ -39,9 +38,9 @@ c2net_context = prepare()
##### 2,获取代码路径

```
code_path = c2net_context.code_path +"/" +"项目名"
code_path = c2net_context.code_path +"/" +"项目名".lower()
在本示例中代码路径为:
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example"
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example".lower()
```

##### 3,获取数据集路径


+ 2
- 2
npu_mnist_example/README.md View File

@@ -40,9 +40,9 @@ c2net_context = prepare()
##### 2,获取代码路径

```
code_path = c2net_context.code_path +"/" +"项目名"
code_path = c2net_context.code_path +"/" + "项目名".lower()
在本示例中代码路径为:
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example"
code_path = c2net_context.code_path + "/" + "Openl_Cloudbrain_Example".lower()
```

##### 3,获取数据集路径


+ 5
- 2
npu_mnist_example/train_multi_card.py View File

@@ -50,10 +50,13 @@ parser.add_argument('--epoch_size',
if __name__ == "__main__":
###请在代码中加入args, unknown = parser.parse_known_args(),可忽略掉--ckpt_url参数报错等参数问题
args, unknown = parser.parse_known_args()
MnistDataset_mindspore_path = ''
Mindspore_MNIST_Example_Model_path = ''
output_path = ''

device_num = int(os.getenv('RANK_SIZE'))
#使用多卡时
# set device_id and init for multi-card training
# set device_id and init for multi-card training
context.set_context(mode=context.GRAPH_MODE, device_target=args.device_target, device_id=int(os.getenv('ASCEND_DEVICE_ID')))
context.reset_auto_parallel_context()
context.set_auto_parallel_context(device_num = device_num, parallel_mode=ParallelMode.DATA_PARALLEL, gradients_mean=True, parameter_broadcast=True)


Loading…
Cancel
Save