From f11b05fff40af99cb61e0c101d6e68ad3ef73def Mon Sep 17 00:00:00 2001 From: barrierye Date: Wed, 21 Nov 2018 17:20:18 +0800 Subject: [PATCH] update async_executor.py for support set_use_slots and set set_dense_slots --- python/paddle/fluid/async_executor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/fluid/async_executor.py b/python/paddle/fluid/async_executor.py index 7896a61f02e..671fe463e57 100644 --- a/python/paddle/fluid/async_executor.py +++ b/python/paddle/fluid/async_executor.py @@ -45,6 +45,10 @@ class DataFeedDesc(object): def get_slot(self, name): return self.proto_desc.multi_slot_desc.slots[self.__name_to_index[name]] + def set_dense_slots(self, dense_slots_name): + for name in dense_slots_name: + self.proto_desc.multi_slot_desc.slots[self.__name_to_index[name]].dense = True + def set_use_slots(self, use_slots_name): for name in use_slots_name: self.proto_desc.multi_slot_desc.slots[self.__name_to_index[name]].use = True -- GitLab