提交 65e0a8e8 编写于 作者: Y yinhaofeng

add sample_data

上级 ff1250fd
...@@ -19,15 +19,15 @@ workspace: "models/rank/fm" ...@@ -19,15 +19,15 @@ workspace: "models/rank/fm"
dataset: dataset:
- name: train_sample - name: train_sample
type: QueueDataset type: DataLoader
batch_size: 5 batch_size: 5
data_path: "{workspace}/../dataset/Criteo_data/sample_data/train" data_path: "{workspace}/data/sample_data/train"
sparse_slots: "label feat_idx" sparse_slots: "label feat_idx"
dense_slots: "feat_value:39" dense_slots: "feat_value:39"
- name: infer_sample - name: infer_sample
type: QueueDataset type: DataLoader
batch_size: 5 batch_size: 5
data_path: "{workspace}/../dataset/Criteo_data/sample_data/train" data_path: "{workspace}/data/sample_data/train"
sparse_slots: "label feat_idx" sparse_slots: "label feat_idx"
dense_slots: "feat_value:39" dense_slots: "feat_value:39"
...@@ -42,13 +42,13 @@ hyper_parameters: ...@@ -42,13 +42,13 @@ hyper_parameters:
reg: 0.001 reg: 0.001
num_field: 39 num_field: 39
mode: train_runner mode: [train_runner,infer_runner]
# if infer, change mode to "infer_runner" and change phase to "infer_phase" # if infer, change mode to "infer_runner" and change phase to "infer_phase"
runner: runner:
- name: train_runner - name: train_runner
class: train class: train
epochs: 1 epochs: 2
device: cpu device: cpu
init_model_path: "" init_model_path: ""
save_checkpoint_interval: 1 save_checkpoint_interval: 1
...@@ -59,7 +59,7 @@ runner: ...@@ -59,7 +59,7 @@ runner:
- name: infer_runner - name: infer_runner
class: infer class: infer
device: cpu device: cpu
init_model_path: "increment/0" init_model_path: "increment"
print_interval: 1 print_interval: 1
phase: phase:
...@@ -67,7 +67,7 @@ phase: ...@@ -67,7 +67,7 @@ phase:
model: "{workspace}/model.py" model: "{workspace}/model.py"
dataset_name: train_sample dataset_name: train_sample
thread_num: 1 thread_num: 1
#- name: infer_phase - name: infer_phase
# model: "{workspace}/model.py" model: "{workspace}/model.py"
# dataset_name: infer_sample dataset_name: infer_sample
# thread_num: 1 thread_num: 1
此差异已折叠。
...@@ -258,3 +258,36 @@ auc_var, batch_auc_var, _ = fluid.layers.auc(input=predict_2d, ...@@ -258,3 +258,36 @@ auc_var, batch_auc_var, _ = fluid.layers.auc(input=predict_2d,
``` ```
完成上述组网后,我们最终可以通过训练拿到`auc`指标。 完成上述组网后,我们最终可以通过训练拿到`auc`指标。
```
PaddleRec: Runner train_runner Begin
Executor Mode: train
processor_register begin
Running SingleInstance.
Running SingleNetwork.
Warning:please make sure there are no hidden files in the dataset folder and check these hidden files:[]
Warning:please make sure there are no hidden files in the dataset folder and check these hidden files:[]
Running SingleStartup.
Running SingleRunner.
I0921 13:11:33.118367 20932 parallel_executor.cc:440] The Program will be executed on CPU using ParallelExecutor, 1 cards are used, so 1 programs are executed in parallel.
I0921 13:11:33.120508 20932 build_strategy.cc:365] SeqOnlyAllReduceOps:0, num_trainers:1
I0921 13:11:33.122474 20932 parallel_executor.cc:307] Inplace strategy is enabled, when build_strategy.enable_inplace = True
I0921 13:11:33.123886 20932 parallel_executor.cc:375] Garbage collection strategy is enabled, when FLAGS_eager_delete_tensor_gb = 0
2020-09-21 13:11:33,631-INFO: [Train] batch: 1, time_each_interval: 0.51s, BATCH_AUC: [0.44643497], AUC: [0.44643497]
2020-09-21 13:11:33,831-INFO: [Train] batch: 2, time_each_interval: 0.20s, BATCH_AUC: [0.46514697], AUC: [0.46514697]
2020-09-21 13:11:33,983-INFO: [Train] batch: 3, time_each_interval: 0.15s, BATCH_AUC: [0.47406181], AUC: [0.47406181]
2020-09-21 13:11:34,139-INFO: [Train] batch: 4, time_each_interval: 0.16s, BATCH_AUC: [0.47984827], AUC: [0.47984827]
...
2020-09-22 12:16:08,478-INFO: [Infer] batch: 8973, time_each_interval: 0.25s, AUC: [0.76192624]
2020-09-22 12:16:08,625-INFO: [Infer] batch: 8974, time_each_interval: 0.15s, AUC: [0.76192887]
2020-09-22 12:16:08,760-INFO: [Infer] batch: 8975, time_each_interval: 0.14s, AUC: [0.76193024]
2020-09-22 12:16:08,964-INFO: [Infer] batch: 8976, time_each_interval: 0.20s, AUC: [0.76193132]
2020-09-22 12:16:09,186-INFO: [Infer] batch: 8977, time_each_interval: 0.22s, AUC: [0.7619334]
2020-09-22 12:16:09,439-INFO: [Infer] batch: 8978, time_each_interval: 0.25s, AUC: [0.7619324]
2020-09-22 12:16:09,687-INFO: [Infer] batch: 8979, time_each_interval: 0.25s, AUC: [0.76193426]
2020-09-22 12:16:09,900-INFO: [Infer] batch: 8980, time_each_interval: 0.21s, AUC: [0.76193488]
2020-09-22 12:16:10,101-INFO: [Infer] batch: 8981, time_each_interval: 0.20s, AUC: [0.76193451]
2020-09-22 12:16:10,279-INFO: [Infer] batch: 8982, time_each_interval: 0.18s, AUC: [0.76193513]
2020-09-22 12:16:10,518-INFO: [Infer] batch: 8983, time_each_interval: 0.24s, AUC: [0.76193726]
Infer infer_phase of epoch 1 done, use time: 1764.81796193, global metrics: AUC=0.76193726
PaddleRec Finish
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册