Skip to content
Snippets Groups Projects
Commit a9f57473 authored by GongLiyao's avatar GongLiyao
Browse files

change export default to MINDIR.

parent ae6c158f
No related branches found
No related tags found
No related merge requests found
Showing
with 35 additions and 35 deletions
......@@ -454,13 +454,13 @@ Export on ModelArts (If you want to run in modelarts, please check the official
# Set "checkpoint_file_path='/cache/checkpoint_path/model.ckpt'" on default_config.yaml file.
# Set "checkpoint_url='s3://dir_to_trained_ckpt/'" on default_config.yaml file.
# Set "file_name='./resnet'" on default_config.yaml file.
# Set "file_format='AIR'" on default_config.yaml file.
# Set "file_format='MINDIR'" on default_config.yaml file.
# Set other parameters on default_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "checkpoint_file_path='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add "checkpoint_url='s3://dir_to_trained_ckpt/'" on the website UI interface.
# Add "file_name='./resnet'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add other parameters on the website UI interface.
# (4) Set the code directory to "/path/resnet" on the website UI interface.
# (5) Set the startup file to "export.py" on the website UI interface.
......@@ -590,4 +590,4 @@ Refer to the [ModelZoo FAQ](https://gitee.com/mindspore/models#FAQ) for some com
- **Q: How to use `boost` to get the best performance?**
**A**: We provide the `boost_level` in the `Model` interface, when you set it to `O1` or `O2` mode, the network will automatically speed up. The high-performance mode has been fully verified on resnet50, you can use the `resnet50_imagenet2012_Boost_config.yaml` to experience this mode. Meanwhile, in `O1` or `O2` mode, it is recommended to set the following environment variables: ` export ENV_FUSION_CLEAR=1; export DATASET_ENABLE_NUMA=True; export ENV_SINGLE_EVAL=1; export SKT_ENABLE=1;`.
\ No newline at end of file
**A**: We provide the `boost_level` in the `Model` interface, when you set it to `O1` or `O2` mode, the network will automatically speed up. The high-performance mode has been fully verified on resnet50, you can use the `resnet50_imagenet2012_Boost_config.yaml` to experience this mode. Meanwhile, in `O1` or `O2` mode, it is recommended to set the following environment variables: ` export ENV_FUSION_CLEAR=1; export DATASET_ENABLE_NUMA=True; export ENV_SINGLE_EVAL=1; export SKT_ENABLE=1;`.
......@@ -680,12 +680,12 @@ ModelArts导出mindir
# 设置 "checkpoint_file_path='/cache/checkpoint_path/model.ckpt" 在 yaml 文件。
# 设置 "checkpoint_url=/The path of checkpoint in S3/" 在 yaml 文件。
# 设置 "file_name='./resnet'"参数在yaml文件。
# 设置 "file_format='AIR'" 参数在yaml文件。
# 设置 "file_format='MINDIR'" 参数在yaml文件。
# b. 增加 "enable_modelarts=True" 参数在modearts的界面上。
# 增加 "checkpoint_file_path='/cache/checkpoint_path/model.ckpt'" 参数在modearts的界面上。
# 增加 "checkpoint_url=/The path of checkpoint in S3/" 参数在modearts的界面上。
# 设置 "file_name='./resnet'"参数在modearts的界面上。
# 设置 "file_format='AIR'" 参数在modearts的界面上。
# 设置 "file_format='MINDIR'" 参数在modearts的界面上。
# (4) 在modelarts的界面上设置代码的路径 "/path/resnet"。
# (5) 在modelarts的界面上设置模型的启动文件 "export.py" 。
# 模型的输出路径"Output file path" 和模型的日志路径 "Job log path" 。
......
......@@ -163,13 +163,13 @@ bash run_standalone_eval_ascend.sh [cifar10|imagenet] [DATA_PATH] [CKPT_NAME] [D
# (1) Perform a or b.
# a. Set "enable_modelarts=True" on base_config.yaml file.
# Set "file_name='alexnet'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "file_name='alexnet'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -152,13 +152,13 @@ bash run_standalone_eval_ascend.sh [cifar10|imagenet] [DATA_PATH] [CKPT_NAME] [D
# (1) 执行 a 或者 b.
# a. 在 base_config.yaml 文件中设置 "enable_modelarts=True"
# 在 base_config.yaml 文件中设置 "file_name='alexnet'"
# 在 base_config.yaml 文件中设置 "file_format='AIR'"
# 在 base_config.yaml 文件中设置 "file_format='MINDIR'"
# 在 base_config.yaml 文件中设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在 base_config.yaml 文件中设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在 base_config.yaml 文件中设置 其他参数
# b. 在网页上设置 "enable_modelarts=True"
# 在网页上设置 "file_name='alexnet'"
# 在网页上设置 "file_format='AIR'"
# 在网页上设置 "file_format='MINDIR'"
# 在网页上设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在网页上设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在网页上设置 其他参数
......
......@@ -35,7 +35,7 @@ parser.add_argument("--image_height", type=int, default=500, help="Image height.
parser.add_argument("--image_width", type=int, default=500, help="Image width.")
parser.add_argument("--ckpt_file", type=str, required=True, help="Checkpoint file path.")
parser.add_argument("--file_name", type=str, default="brdnet", help="output file name.")
parser.add_argument("--file_format", type=str, choices=["AIR", "ONNX", "MINDIR"], default="AIR", help="file format")
parser.add_argument("--file_format", type=str, choices=["AIR", "ONNX", "MINDIR"], default="MINDIR", help="file format")
parser.add_argument('--device_target', type=str, default='Ascend'
, help='device where the code will be implemented. (Default: Ascend)')
parser.add_argument("--device_id", type=int, default=0, help="Device id")
......
......@@ -50,7 +50,7 @@ python export.py \
--image_width=500 \
--ckpt_file=xxx/brdnet.ckpt \
--file_name=brdnet \
--file_format=AIR \
--file_format='AIR' \
--device_target=Ascend \
--device_id=0 \
```
......
......@@ -286,13 +286,13 @@ bash eval_all.sh [GROUND_TRUTH_PATH] [FILTER_EASY](optional) [FILTER_MEDIUM](opt
# (1) Perform a or b.
# a. Set "enable_modelarts=True" on base_config.yaml file.
# Set "file_name='centerface'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "file_name='centerface'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -445,7 +445,7 @@ bash run_eval_s8_multiscale_flip.sh
# Set "export_model='deeplab_v3_s8'" on base_config.yaml file.
# Set "export_batch_size=1" on base_config.yaml file.
# Set "file_name='deeplabv3'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
......@@ -453,7 +453,7 @@ bash run_eval_s8_multiscale_flip.sh
# Add "export_model='deeplab_v3_s8'" on the website UI interface.
# Add "export_batch_size=1" on the website UI interface.
# Add "file_name='deeplabv3'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -446,7 +446,7 @@ bash run_eval_s8_multiscale_flip.sh
# 在 base_config.yaml 文件中设置 "export_model='deeplab_v3_s8'"
# 在 base_config.yaml 文件中设置 "export_batch_size=1"
# 在 base_config.yaml 文件中设置 "file_name='deeplabv3'"
# 在 base_config.yaml 文件中设置 "file_format='AIR'"
# 在 base_config.yaml 文件中设置 "file_format='MINDIR'"
# 在 base_config.yaml 文件中设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在 base_config.yaml 文件中设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在 base_config.yaml 文件中设置 其他参数
......@@ -454,7 +454,7 @@ bash run_eval_s8_multiscale_flip.sh
# 在网页上设置 "export_model='deeplab_v3_s8'"
# 在网页上设置 "export_batch_size=1"
# 在网页上设置 "file_name='deeplabv3'"
# 在网页上设置 "file_format='AIR'"
# 在网页上设置 "file_format='MINDIR'"
# 在网页上设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在网页上设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在网页上设置 其他参数
......
......@@ -24,4 +24,4 @@ if __name__ == '__main__':
# load the parameter into net
load_param_into_net(network, param_dict)
input_data = np.random.uniform(0.0, 1.0, size=[32, 3, 513, 513]).astype(np.float32)
export(network, Tensor(input_data), file_name=args.model + '-300_11.air', file_format='AIR')
export(network, Tensor(input_data), file_name=args.model + '-300_11.air', file_format='MINDIR')
......@@ -57,7 +57,7 @@ if __name__ == "__main__":
export(coarse_net, Tensor(input_rgb_coarsenet), file_name=os.path.join(mindir_dir, "FinalCoarseNet"),
file_format='MINDIR')
export(coarse_net, Tensor(input_rgb_coarsenet), file_name=os.path.join(air_dir, "FinalCoarseNet"),
file_format='AIR')
file_format='MINDIR')
else:
fine_net = FineNet()
fine_net_file_name = os.path.join(ckpt_dir, "FinalFineNet.ckpt")
......@@ -68,4 +68,4 @@ if __name__ == "__main__":
export(fine_net, Tensor(input_rgb_finenet), Tensor(input_coarse_depth),
file_name=os.path.join(mindir_dir, "FinalFineNet"), file_format='MINDIR')
export(fine_net, Tensor(input_rgb_finenet), Tensor(input_coarse_depth),
file_name=os.path.join(air_dir, "FinalFineNet"), file_format='AIR')
file_name=os.path.join(air_dir, "FinalFineNet"), file_format='MINDIR')
......@@ -57,7 +57,7 @@ parser.add_argument(
"AIR",
"ONNX",
"MINDIR"],
default="AIR",
default='MINDIR',
help="file format")
args_opt = parser.parse_args()
......
......@@ -95,7 +95,7 @@ python export.py \
--image_width=1280 \
--ckpt_file=xxx/east.ckpt \
--file_name=east \
--file_format=AIR \
--file_format='MINDIR' \
--device_target=Ascend \
--device_id=0 \
```
......
......@@ -268,13 +268,13 @@ bash run_infer_310.sh [MINDIR_PATH] [DATA_PATH] [ANN_FILE] [IMAGE_WIDTH](optiona
# (1) Perform a or b.
# a. Set "enable_modelarts=True" on base_config.yaml file.
# Set "file_name='faster_rcnn'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "file_name='faster_rcnn'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -268,13 +268,13 @@ bash run_infer_310.sh [MINDIR_PATH] [DATA_PATH] [ANN_FILE] [IMAGE_WIDTH](optiona
# (1) 执行 a 或者 b.
# a. 在 base_config.yaml 文件中设置 "enable_modelarts=True"
# 在 base_config.yaml 文件中设置 "file_name='faster_rcnn'"
# 在 base_config.yaml 文件中设置 "file_format='AIR'"
# 在 base_config.yaml 文件中设置 "file_format='MINDIR'"
# 在 base_config.yaml 文件中设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在 base_config.yaml 文件中设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在 base_config.yaml 文件中设置 其他参数
# b. 在网页上设置 "enable_modelarts=True"
# 在网页上设置 "file_name='faster_rcnn'"
# 在网页上设置 "file_format='AIR'"
# 在网页上设置 "file_format='MINDIR'"
# 在网页上设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在网页上设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在网页上设置 其他参数
......
......@@ -49,7 +49,7 @@ python export.py \
--image_width=768 \
--ckpt_file=xxx/fastscnn.ckpt \
--file_name=fastscnn \
--file_format=AIR \
--file_format='MINDIR' \
--device_target=Ascend \
--device_id=0 \
......
......@@ -179,13 +179,13 @@ For FP16 operators, if the input data type is FP32, the backend of MindSpore wil
# (1) Perform a or b.
# a. Set "enable_modelarts=True" on base_config.yaml file.
# Set "file_name='inceptionv3'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "file_name='inceptionv3'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -183,13 +183,13 @@ InceptionV3的总体网络架构如下:
# (1) 执行 a 或者 b.
# a. 在 base_config.yaml 文件中设置 "enable_modelarts=True"
# 在 base_config.yaml 文件中设置 "file_name='inceptionv3'"
# 在 base_config.yaml 文件中设置 "file_format='AIR'"
# 在 base_config.yaml 文件中设置 "file_format='MINDIR'"
# 在 base_config.yaml 文件中设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在 base_config.yaml 文件中设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在 base_config.yaml 文件中设置 其他参数
# b. 在网页上设置 "enable_modelarts=True"
# 在网页上设置 "file_name='inceptionv3'"
# 在网页上设置 "file_format='AIR'"
# 在网页上设置 "file_format='MINDIR'"
# 在网页上设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在网页上设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在网页上设置 其他参数
......
......@@ -135,13 +135,13 @@ bash run_standalone_eval_ascend.sh [DATA_PATH] [CKPT_NAME]
# (1) Perform a or b.
# a. Set "enable_modelarts=True" on base_config.yaml file.
# Set "file_name='lenet'" on base_config.yaml file.
# Set "file_format='AIR'" on base_config.yaml file.
# Set "file_format='MINDIR'" on base_config.yaml file.
# Set "checkpoint_url='/The path of checkpoint in S3/'" on beta_config.yaml file.
# Set "ckpt_file='/cache/checkpoint_path/model.ckpt'" on base_config.yaml file.
# Set other parameters on base_config.yaml file you need.
# b. Add "enable_modelarts=True" on the website UI interface.
# Add "file_name='lenet'" on the website UI interface.
# Add "file_format='AIR'" on the website UI interface.
# Add "file_format='MINDIR'" on the website UI interface.
# Add "checkpoint_url='/The path of checkpoint in S3/'" on the website UI interface.
# Add "ckpt_file='/cache/checkpoint_path/model.ckpt'" on the website UI interface.
# Add other parameters on the website UI interface.
......
......@@ -135,13 +135,13 @@ bash run_standalone_eval_ascend.sh [DATA_PATH] [CKPT_NAME]
# (1) 执行 a 或者 b.
# a. 在 base_config.yaml 文件中设置 "enable_modelarts=True"
# 在 base_config.yaml 文件中设置 "file_name='/cache/train/lenet'"
# 在 base_config.yaml 文件中设置 "file_format='AIR'"
# 在 base_config.yaml 文件中设置 "file_format='MINDIR'"
# 在 base_config.yaml 文件中设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在 base_config.yaml 文件中设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在 base_config.yaml 文件中设置 其他参数
# b. 在网页上设置 "enable_modelarts=True"
# 在网页上设置 "file_name='/cache/train/lenet'"
# 在网页上设置 "file_format='AIR'"
# 在网页上设置 "file_format='MINDIR'"
# 在网页上设置 "checkpoint_url='/The path of checkpoint in S3/'"
# 在网页上设置 "ckpt_file='/cache/checkpoint_path/model.ckpt'"
# 在网页上设置 其他参数
......
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