From 457d012a8e043afa43365e84ef25565a8720e01e Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Mon, 5 Mar 2018 13:48:40 +0800 Subject: [PATCH] Enable device automatically switching in mine_hard_examples_op. (#8706) --- paddle/fluid/operators/mine_hard_examples_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/mine_hard_examples_op.cc b/paddle/fluid/operators/mine_hard_examples_op.cc index b7e9f4e2248..0e81d60878d 100644 --- a/paddle/fluid/operators/mine_hard_examples_op.cc +++ b/paddle/fluid/operators/mine_hard_examples_op.cc @@ -247,7 +247,7 @@ class MineHardExamplesOp : public framework::OperatorWithKernel { const framework::ExecutionContext& ctx) const override { return framework::OpKernelType( framework::ToDataType(ctx.Input("ClsLoss")->type()), - ctx.device_context()); + platform::CPUPlace()); } }; -- GitLab