提交 d1d825ee 编写于 作者: Y yuyang18

Hide unnecessary API

上级 265302ed
......@@ -621,13 +621,14 @@ All parameter, weight, gradient are variables in Paddle.
[](ExecutionStrategy &self, size_t num_iteration_per_drop_scope) {
self.num_iteration_per_drop_scope_ = num_iteration_per_drop_scope;
});
py::enum_<ExecutionStrategy::ExecutorType>(exec_strategy, "ExecutorType")
.value("Default", ExecutionStrategy::kDefault)
.value("Experimental", ExecutionStrategy::kExperimental);
exec_strategy.def_property(
"type", [](const ExecutionStrategy &self) { return self.type_; },
[](ExecutionStrategy &self, ExecutionStrategy::ExecutorType type) {
self.type_ = type;
"use_experimental_executor",
[](const ExecutionStrategy &self) {
return self.type_ == ExecutionStrategy::kExperimental;
},
[](ExecutionStrategy &self, bool experimental) {
self.type_ = experimental ? ExecutionStrategy::kExperimental
: ExecutionStrategy::kDefault;
});
py::class_<BuildStrategy> build_strategy(pe, "BuildStrategy");
......
......@@ -71,7 +71,7 @@ class TestParallelExecutorBase(unittest.TestCase):
exec_strategy = fluid.ExecutionStrategy()
exec_strategy.allow_op_delay = allow_op_delay
if use_fast_executor:
exec_strategy.type = fluid.ExecutionStrategy.ExecutorType.Experimental
exec_strategy.use_experimental_executor = True
build_strategy = fluid.BuildStrategy()
build_strategy.reduce_strategy = fluid.BuildStrategy.ReduceStrategy.Reduce \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册