From 22c8cb654f1ba9e7532c8407cefaaf2695e34066 Mon Sep 17 00:00:00 2001 From: zhouneng <zhouneng2@huawei.com> Date: Mon, 29 Nov 2021 09:30:59 +0800 Subject: [PATCH] [Deepfm]README update --- official/cv/dpn/README.md | 41 ++++++++++++------- .../faster_rcnn/src/FasterRcnn/faster_rcnn.py | 7 ++-- official/recommend/deepfm/README.md | 4 +- official/recommend/deepfm/README_CN.md | 4 +- official/recommend/deepfm/requirements.txt | 8 ++-- official/recommend/wide_and_deep/README.md | 2 +- official/recommend/wide_and_deep/README_CN.md | 2 +- 7 files changed, 40 insertions(+), 28 deletions(-) diff --git a/official/cv/dpn/README.md b/official/cv/dpn/README.md index f1ece0a32..88c991afb 100644 --- a/official/cv/dpn/README.md +++ b/official/cv/dpn/README.md @@ -111,24 +111,35 @@ bash scripts/eval.sh [device_id] [eval_data_dir] [checkpoint_path] The structure of the files in this repository is shown below. ```text -鈹斺攢 mindspore-dpns +鈹斺攢 dpn + 鈹溾攢 ascend310_infer // application for 310 inference + 鈹溾攢 infer // inference + 鈹溾攢 modelarts // run model on modelarts 鈹溾攢 scripts - 鈹� 鈹溾攢 eval.sh // launch ascend standalone evaluation - 鈹� 鈹溾攢 train_distributed.sh // launch ascend distributed training - 鈹� 鈹斺攢 train_standalone.sh // launch ascend standalone training + 鈹溾攢 docker_start.sh + 鈹溾攢 eval.sh // launch ascend standalone evaluation + 鈹溾攢 run_infer_310.sh // 310 infer + 鈹溾攢 train_distributed.sh // launch ascend distributed training + 鈹斺攢 train_standalone.sh // launch ascend standalone training 鈹溾攢 src - 鈹� 鈹溾攢 config.py // network and running config - 鈹� 鈹溾攢 crossentropy.py // loss function - 鈹� 鈹溾攢 dpn.py // dpns implementation - 鈹� 鈹溾攢 imagenet_dataset.py // dataset processor and provider - 鈹� 鈹斺攢 lr_scheduler.py // dpn learning rate scheduler - 鈹溾攢鈹€ model_utils - 鈹溾攢鈹€config.py // Parameter config - 鈹溾攢鈹€moxing_adapter.py // modelarts device configuration - 鈹溾攢鈹€device_adapter.py // Device Config - 鈹溾攢鈹€local_adapter.py // local device config + 鈹溾攢 callbacks.py // user-defined callbacks + 鈹溾攢 crossentropy.py // user-defined loss functions + 鈹溾攢 dpn.py // dpns implementation + 鈹溾攢 imagenet_dataset.py // dataset processor and provider + 鈹溾攢 lr_scheduler.py // dpn learning rate scheduler + 鈹溾攢鈹€ model_utils + 鈹溾攢鈹€ __init__.py + 鈹溾攢鈹€ config.py // configuration and parameters parse + 鈹溾攢鈹€ moxing_adapter.py // modelarts device configuration + 鈹溾攢鈹€ device_adapter.py // Device Config + 鈹溾攢鈹€ local_adapter.py // local device config + 鈹溾攢 default_config.yaml // default configuration file 鈹溾攢 eval.py // evaluation script 鈹溾攢 train.py // training script + 鈹溾攢 mindspore_hub_conf.py // mindspore hub interface + 鈹溾攢 postprocess.py // post-processing script for 310 inference + 鈹溾攢 preprocess.py // dataset preprocess script + 鈹溾攢 requirements.txt // dependent package description file 鈹溾攢 export.py // export model 鈹斺攢 README.md // descriptions about this repository ``` @@ -318,7 +329,7 @@ DPN evaluate success! ### [Export MindIR](#contents) ```shell -python export.py --config_path [CONFIG_PATH] --checkpoint_path [CKPT_PATH] --file_name [FILE_NAME] --file_format [FILE_FORMAT] +python export.py --file_name [filename] --file_format [file format] --checkpoint_path [ckpt path] ``` The `checkpoint_path` parameter is required, diff --git a/official/cv/faster_rcnn/src/FasterRcnn/faster_rcnn.py b/official/cv/faster_rcnn/src/FasterRcnn/faster_rcnn.py index 9258a60a5..b2fe4a028 100644 --- a/official/cv/faster_rcnn/src/FasterRcnn/faster_rcnn.py +++ b/official/cv/faster_rcnn/src/FasterRcnn/faster_rcnn.py @@ -28,13 +28,14 @@ from .rcnn import Rcnn from .rpn import RPN from .roi_align import SingleRoIExtractor from .anchor_generator import AnchorGenerator +from ..model_utils.config import config as default_cfg -if config.backbone in ("resnet_v1.5_50", "resnet_v1_101", "resnet_v1_152"): +if default_cfg.backbone in ("resnet_v1.5_50", "resnet_v1_101", "resnet_v1_152"): from .resnet import ResNetFea, ResidualBlockUsing -elif config.backbone == "resnet_v1_50": +elif default_cfg.backbone == "resnet_v1_50": from .resnet import ResNetFea from .resnet50v1 import ResidualBlockUsing_V1 -elif config.backbone == 'inception_resnet_v2': +elif default_cfg.backbone == 'inception_resnet_v2': from .inceptionresnetv2 import InceptionResNetV2 diff --git a/official/recommend/deepfm/README.md b/official/recommend/deepfm/README.md index 3e3d47277..1609fbbf0 100644 --- a/official/recommend/deepfm/README.md +++ b/official/recommend/deepfm/README.md @@ -38,7 +38,7 @@ The FM and deep component share the same input raw feature vector, which enables # [Dataset](#contents) -- [1] A dataset used in Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li, Xiuqiang He. DeepFM: A Factorization-Machine based Neural Network for CTR Prediction[J]. 2017. +- [Criteo Kaggle Display Advertising Challenge Dataset](http://go.criteo.net/criteo-research-kaggle-display-advertising-challenge-dataset.tar.gz) # [Environment Requirements](#contents) @@ -64,7 +64,7 @@ After installing MindSpore via the official website, you can start training and tar -zxvf dac.tar.gz #preprocess dataset - python src/preprocess_data.py --data_path=./data/ --dense_dim=13 --slot_dim=26 --threshold=100 --train_line_count=45840617 --skip_id_convert=0 + python -m src.preprocess_data --data_path=./data/ --dense_dim=13 --slot_dim=26 --threshold=100 --train_line_count=45840617 --skip_id_convert=0 ''' - running on Ascend diff --git a/official/recommend/deepfm/README_CN.md b/official/recommend/deepfm/README_CN.md index 433f1d548..b47d7bfee 100644 --- a/official/recommend/deepfm/README_CN.md +++ b/official/recommend/deepfm/README_CN.md @@ -42,7 +42,7 @@ FM鍜屾繁搴﹀涔犻儴鍒嗘嫢鏈夌浉鍚岀殑杈撳叆鍘熸牱鐗瑰緛鍚戦噺锛岃DeepFM鑳戒粠 ## 鏁版嵁闆� -- [1] A dataset used in Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li, Xiuqiang He. DeepFM: A Factorization-Machine based Neural Network for CTR Prediction[J]. 2017. +- [Criteo Kaggle Display Advertising Challenge Dataset](http://go.criteo.net/criteo-research-kaggle-display-advertising-challenge-dataset.tar.gz) ## 鐜瑕佹眰 @@ -67,7 +67,7 @@ FM鍜屾繁搴﹀涔犻儴鍒嗘嫢鏈夌浉鍚岀殑杈撳叆鍘熸牱鐗瑰緛鍚戦噺锛岃DeepFM鑳戒粠 tar -zxvf dac.tar.gz #鏁版嵁闆嗛澶勭悊鑴氭鎵ц - python src/preprocess_data.py --data_path=./data/ --dense_dim=13 --slot_dim=26 --threshold=100 --train_line_count=45840617 --skip_id_convert=0 + python -m src.preprocess_data --data_path=./data/ --dense_dim=13 --slot_dim=26 --threshold=100 --train_line_count=45840617 --skip_id_convert=0 ''' - Ascend澶勭悊鍣ㄧ幆澧冭繍琛� diff --git a/official/recommend/deepfm/requirements.txt b/official/recommend/deepfm/requirements.txt index 0b7a500b0..db631a391 100644 --- a/official/recommend/deepfm/requirements.txt +++ b/official/recommend/deepfm/requirements.txt @@ -1,4 +1,4 @@ -numpy -sklearn -pandas -pyyaml +numpy==1.17.5 +scikit-learn==0.23.1 +pandas==1.0.5 +pyyaml==5.3.1 diff --git a/official/recommend/wide_and_deep/README.md b/official/recommend/wide_and_deep/README.md index d7d406056..fe6ca42d0 100644 --- a/official/recommend/wide_and_deep/README.md +++ b/official/recommend/wide_and_deep/README.md @@ -44,7 +44,7 @@ Currently we support host-device mode with multi-dimensional partition parallel # [Dataset](#contents) -- [1] A dataset used in Guo H , Tang R , Ye Y , et al. DeepFM: A Factorization-Machine based Neural Network for CTR Prediction[J]. 2017. +- [Criteo Kaggle Display Advertising Challenge Dataset](http://go.criteo.net/criteo-research-kaggle-display-advertising-challenge-dataset.tar.gz) # [Environment Requirements](#contents) diff --git a/official/recommend/wide_and_deep/README_CN.md b/official/recommend/wide_and_deep/README_CN.md index 4eb80af4b..9e03cce88 100644 --- a/official/recommend/wide_and_deep/README_CN.md +++ b/official/recommend/wide_and_deep/README_CN.md @@ -47,7 +47,7 @@ Wide&Deep妯″瀷璁粌浜嗗绾挎€фā鍨嬪拰娣卞害瀛︿範绁炵粡缃戠粶锛岀粨鍚堜簡 # 鏁版嵁闆� -- [1] Guo H 銆乀ang R鍜孻e Y绛変汉浣跨敤鐨勬暟鎹泦銆� DeepFM: A Factorization-Machine based Neural Network for CTR Prediction[J].2017. +- [Criteo Kaggle Display Advertising Challenge Dataset](http://go.criteo.net/criteo-research-kaggle-display-advertising-challenge-dataset.tar.gz) # 鐜瑕佹眰 -- GitLab