diff --git a/Example_Picture/运行参数界面.png b/Example_Picture/运行参数界面.png new file mode 100644 index 0000000..16ef61c Binary files /dev/null and b/Example_Picture/运行参数界面.png differ diff --git a/README.md b/README.md index a11b004..17d89b6 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ | 运行参数 | 数据存储位置和训练输出位置分别对应运行参数data_url和train_url,选择增加运行参数可以向脚本中其他参数传值,如epoch_size。在这里只需填入其他参数传值,data_url和train_url已默认加入运行参数,用户无需重复指定,只需在代码中指定。 | | 资源池 | 规格选择[Ascend: 1 * Ascend 910 CPU:24 核 256GiB],表示单机单卡 | +注:若要在启智平台上使用NPU,需要在启智平台训练界面上加上运行参数device_target=Ascend,否则默认是CPU,如下图所示 +![avatar](Example_Picture/运行参数界面.png) ## 4 查看运行结果 ### 4.1 在训练作业界面可以查看运行日志 ![avatar](Example_Picture/查看日志页面.png) diff --git a/train.py b/train.py index d338a86..c394ed1 100644 --- a/train.py +++ b/train.py @@ -71,8 +71,8 @@ parser.add_argument( '--device_target', type=str, default="Ascend", - choices=['Ascend', 'GPU', 'CPU'], - help='device where the code will be implemented (default: Ascend)') + choices=['Ascend', 'CPU'], + help='device where the code will be implemented (default: CPU),若要在启智平台上使用NPU,需要在启智平台训练界面上加上运行参数device_target=Ascend') #modelarts已经默认使用data_url和train_url parser.add_argument('--epoch_size',