From d4a677783cc7c2110f8d3f2290f052bfe83de28b Mon Sep 17 00:00:00 2001 From: xiexionghang Date: Thu, 19 Sep 2019 21:31:09 +0800 Subject: [PATCH] support weightAdjust by show --- paddle/fluid/train/custom_trainer/feed/scripts/join.py | 3 ++- paddle/fluid/train/custom_trainer/feed/scripts/update.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/train/custom_trainer/feed/scripts/join.py b/paddle/fluid/train/custom_trainer/feed/scripts/join.py index 2eb3da7f..f0317adf 100644 --- a/paddle/fluid/train/custom_trainer/feed/scripts/join.py +++ b/paddle/fluid/train/custom_trainer/feed/scripts/join.py @@ -55,7 +55,8 @@ def inference(): { "class": "AbacusSparseJoinAccessor", "input": "sparses", "table_id": 0, "need_gradient": False}, { "class": "DenseInputAccessor", "input": "vars", "table_id": 1, "need_gradient": True, "async_pull": True}, { "class": "DenseInputAccessor", "input": "sums", "table_id": 2, "need_gradient": True, "async_pull": True}, - { "class": "WeightsAdjustAccessor", "input": "ins_weight", "slot_id": 6002, "adjw_ratio": 20, "adjw_threshold": 1000 }, + { "class": "WeightsAdjustAccessor", "input": "ins_weight", + "slot_id": 6002, "adjw_ratio": 20, "adjw_threshold": 1000 }, { "class": "LabelInputAccessor", "input": "labels"} ] diff --git a/paddle/fluid/train/custom_trainer/feed/scripts/update.py b/paddle/fluid/train/custom_trainer/feed/scripts/update.py index 7fe76be0..aa5c2f3f 100644 --- a/paddle/fluid/train/custom_trainer/feed/scripts/update.py +++ b/paddle/fluid/train/custom_trainer/feed/scripts/update.py @@ -51,7 +51,8 @@ def inference(): accessors = [ { "class": "AbacusSparseUpdateAccessor", "input": "sparses", "table_id": 0, "need_gradient": True}, { "class": "DenseInputAccessor", "input": "vars", "table_id": 5, "need_gradient": True, "async_pull": True}, - { "class": "WeightsAdjustAccessor", "input": "ins_weight", "slot_id": 6002, "adjw_ratio": 20, "adjw_threshold": 1000 }, + { "class": "WeightsAdjustAccessor", "input": "ins_weight", + "slot_id": 6002, "adjw_ratio": 20, "adjw_threshold": 1000}, { "class": "LabelInputAccessor", "input": "labels"} ] monitors = [ -- GitLab