Skip to content
Snippets Groups Projects
Commit 7c7aad84 authored by lianghao23's avatar lianghao23
Browse files

Fix README for CPU, and the name of default config file.

parent 5ee12519
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ After installing MindSpore via the official website, you can start training and
- running on GPU
For running on GPU, please change `device_target` from `Ascend` to `GPU` in configuration file src/config.py
For running on GPU, please change `device_target` from `Ascend` to `GPU` in configuration file [dataset]_config.yaml
```python
# run training example
......@@ -145,10 +145,14 @@ After installing MindSpore via the official website, you can start training and
```python
# run training example
bash run_train_cpu.sh
OR
nohup python train.py --config_path=cifar10_config_cpu.yaml --dataset_name=cifar10 > train.log 2>&1 &
# run evaluation example
nohup python eval.py --checkpoint_path=[CHECKPOINT_PATH] > eval.log 2>&1 &
bash run_eval_cpu.sh
OR
nohup python eval.py --checkpoint_path=[CHECKPOINT_PATH] --config_path=cifar10_config_cpu.yaml > eval.log 2>&1 &
```
We use CIFAR-10 dataset by default. Your can also pass `$dataset_type` to the scripts so that select different datasets. For more details, please refer the specify script.
......
......@@ -127,7 +127,7 @@ GoogleNet由多个inception模块串联起来,可以更加深入。 降维的
- GPU处理器环境运行
为了在GPU处理器环境运行,请将配置文件src/config.py中的`device_target``Ascend`改为`GPU`
为了在GPU处理器环境运行,请将配置文件[dataset]_config.yaml中的`device_target``Ascend`改为`GPU`
```python
# 运行训练示例
......@@ -147,10 +147,14 @@ GoogleNet由多个inception模块串联起来,可以更加深入。 降维的
```python
# 运行训练示例
bash run_train_cpu.sh
OR
nohup python train.py --config_path=cifar10_config_cpu.yaml --dataset_name=cifar10 > train.log 2>&1 &
# 运行评估示例
nohup python eval.py --checkpoint_path=[CHECKPOINT_PATH] > eval.log 2>&1 &
bash run_eval_cpu.sh
OR
nohup python eval.py --checkpoint_path=[CHECKPOINT_PATH] --config_path=cifar10_config_cpu.yaml > eval.log 2>&1 &
```
默认使用CIFAR-10数据集。您也可以将`$dataset_type`传入脚本,以便选择其他数据集。如需查看更多详情,请参考指定脚本。
......
......@@ -115,7 +115,7 @@ def get_config():
"""
parser = argparse.ArgumentParser(description="default name", add_help=False)
current_dir = os.path.dirname(os.path.abspath(__file__))
parser.add_argument("--config_path", type=str, default=os.path.join(current_dir, "../default_config.yaml"),
parser.add_argument("--config_path", type=str, default=os.path.join(current_dir, "../cifar10_config.yaml"),
help="Config file path")
path_args, _ = parser.parse_known_args()
default, helper, choices = parse_yaml(path_args.config_path)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment