未验证 提交 9ec67fcf 编写于 作者: G guru4elephant 提交者: GitHub

update readme.cn.md

上级 2207ae95
...@@ -38,17 +38,13 @@ cd data && ./download.sh && cd .. ...@@ -38,17 +38,13 @@ cd data && ./download.sh && cd ..
## 数据准备 ## 数据准备
处理原始数据集,整型特征使用min-max归一化方法规范到[0, 1],类别类特征使用了one-hot编码。原始数据集分割成两部分:90%用于训练,其他10%用于训练过程中的验证。 处理原始数据集,整型特征使用min-max归一化方法规范到[0, 1],类别类特征使用了one-hot编码。原始数据集分割成两部分:90%用于训练,其他10%用于训练过程中的验证。
```bash
python preprocess.py --datadir ./data/raw --outdir ./data
```
## 训练 ## 训练
训练的命令行选项可以通过`python train.py -h`列出。 训练的命令行选项可以通过`python train.py -h`列出。
### 单机训练: ### 单机训练:
```bash ```bash
python train.py \ python train.py \
--train_data_path data/train.txt \ --train_data_path data/raw/train.txt \
2>&1 | tee train.log 2>&1 | tee train.log
``` ```
...@@ -56,7 +52,7 @@ python train.py \ ...@@ -56,7 +52,7 @@ python train.py \
### 分布式训练 ### 分布式训练
本地启动一个2 trainer 2 pserver的分布式训练任务 本地启动一个2 trainer 2 pserver的分布式训练任务,分布式场景下训练数据会按照trainer的id进行切分,保证trainer之间的训练数据不会重叠,提高训练效率
```bash ```bash
sh cluster_train.sh sh cluster_train.sh
...@@ -69,7 +65,7 @@ sh cluster_train.sh ...@@ -69,7 +65,7 @@ sh cluster_train.sh
```bash ```bash
python infer.py \ python infer.py \
--model_path models/pass-0/ \ --model_path models/pass-0/ \
--data_path data/valid.txt --data_path data/raw/valid.txt
``` ```
注意:infer.py跑完最后输出的AUC才是整个预测文件的整体AUC。 注意:infer.py跑完最后输出的AUC才是整个预测文件的整体AUC。
...@@ -77,4 +73,4 @@ python infer.py \ ...@@ -77,4 +73,4 @@ python infer.py \
1. 参考文档 [在百度云上启动Fluid分布式训练](https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst) 在百度云上部署一个CPU集群。 1. 参考文档 [在百度云上启动Fluid分布式训练](https://github.com/PaddlePaddle/FluidDoc/blob/develop/doc/fluid/user_guides/howto/training/train_on_baidu_cloud_cn.rst) 在百度云上部署一个CPU集群。
1. 用preprocess.py处理训练数据生成train.txt。 1. 用preprocess.py处理训练数据生成train.txt。
1. 将train.txt切分成集群机器份,放到每台机器上。 1. 将train.txt切分成集群机器份,放到每台机器上。
1. 用上面的 `分布式训练` 中的命令行启动分布式训练任务. 1. 用上面的 `分布式训练` 中的命令行启动分布式训练任务.
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册