Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
5 years ago | |
|---|---|---|
| .. | ||
| scripts | 5 years ago | |
| src | 5 years ago | |
| README.md | 5 years ago | |
| __init__.py | 5 years ago | |
| eval.py | 5 years ago | |
| train.py | 5 years ago | |
This is an example of training DeepFM with Criteo dataset in MindSpore.
Paper Huifeng Guo, Ruiming Tang, Yunming Ye, Zhenguo Li, Xiuqiang He
The overall network architecture of DeepFM is show below:
├── deepfm
├── README.md
├── scripts
│ ├──run_train.sh
│ ├──run_eval.sh
├── src
│ ├──config.py
│ ├──dataset.py
│ ├──callback.py
│ ├──deepfm.py
├── train.py
├── eval.py
# distribute training example
sh scripts/run_distribute_train.sh 8 /opt/dataset/criteo /opt/mindspore_hccl_file.json
# standalone training example
sh scripts/run_standalone_train.sh 0 /opt/dataset/criteo
or
python train.py --dataset_path /opt/dataset/criteo > output.log 2>&1 &
Training result will be stored in the example path.
Checkpoints will be stored at ./checkpoint by default,
and training log will be redirected to ./output.log by default,
and loss log will be redirected to ./loss.log by default,
and eval log will be redirected to ./auc.log by default.
# infer example
sh scripts/run_eval.sh 0 ~/criteo/eval/ ~/train/deepfm-15_41257.ckpt
checkpoint can be produced in training process.
Inference result will be stored in the example path, you can find result like the followings in auc.log.
2020-05-27 20:51:35 AUC: 0.80577889065281, eval time: 35.55999s.
| Parameters | DeepFM |
|---|---|
| Model Version | |
| Resource | Ascend 910, cpu:2.60GHz 96cores, memory:1.5T |
| uploaded Date | 05/27/2020 |
| MindSpore Version | 0.2.0 |
| Dataset | Criteo |
| Training Parameters | src/config.py |
| Optimizer | Adam |
| Loss Function | SoftmaxCrossEntropyWithLogits |
| outputs | |
| Loss | 0.4234 |
| Accuracy | AUC[0.8055] |
| Total time | 91 min |
| Params (M) | |
| Checkpoint for Fine tuning | |
| Model for inference |
| Parameters | ||
|---|---|---|
| Model Version | ||
| Resource | Ascend 910 | Ascend 310 |
| uploaded Date | 05/27/2020 | 05/27/2020 |
| MindSpore Version | 0.2.0 | 0.2.0 |
| Dataset | Criteo | |
| batch_size | 1000 | |
| outputs | ||
| Accuracy | AUC[0.8055] | |
| Speed | ||
| Total time | 35.559s | |
| Model for inference |
MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
C++ Python Text Unity3D Asset C other