Skip to content

Commit 9f68e9a

Browse files
author
chengduo
authored
fix auc op (#14385)
test=develop
1 parent 38f499d commit 9f68e9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

paddle/fluid/operators/auc_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class AucOp : public framework::OperatorWithKernel {
5353
const framework::ExecutionContext &ctx) const override {
5454
return framework::OpKernelType(
5555
framework::ToDataType(ctx.Input<Tensor>("Predict")->type()),
56-
ctx.device_context());
56+
platform::CPUPlace());
5757
}
5858
};
5959

paddle/fluid/operators/nce_op.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class NCEOp : public framework::OperatorWithKernel {
6969
const framework::ExecutionContext& ctx) const override {
7070
return framework::OpKernelType(
7171
framework::ToDataType(ctx.Input<Tensor>("Input")->type()),
72-
ctx.GetPlace());
72+
platform::CPUPlace());
7373
}
7474
};
7575

@@ -174,7 +174,7 @@ class NCEOpGrad : public framework::OperatorWithKernel {
174174
const framework::ExecutionContext& ctx) const override {
175175
return framework::OpKernelType(
176176
framework::ToDataType(ctx.Input<Tensor>("Input")->type()),
177-
ctx.GetPlace());
177+
platform::CPUPlace());
178178
}
179179
};
180180

0 commit comments

Comments
 (0)