File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ class BipartiteMatchOp : public framework::OperatorWithKernel {
41
41
ctx->SetOutputDim (" ColToRowMatchIndices" , dims);
42
42
ctx->SetOutputDim (" ColToRowMatchDist" , dims);
43
43
}
44
+
45
+ protected:
46
+ framework::OpKernelType GetExpectedKernelType (
47
+ const framework::ExecutionContext& ctx) const override {
48
+ return framework::OpKernelType (
49
+ framework::ToDataType (ctx.Input <LoDTensor>(" DistMat" )->type ()),
50
+ platform::CPUPlace ());
51
+ }
44
52
};
45
53
46
54
template <typename T>
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class MultiClassNMSOp : public framework::OperatorWithKernel {
62
62
return framework::OpKernelType (
63
63
framework::ToDataType (
64
64
ctx.Input <framework::LoDTensor>(" Scores" )->type ()),
65
- ctx. device_context ());
65
+ platform::CPUPlace ());
66
66
}
67
67
};
68
68
Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ class PriorBoxOp : public framework::OperatorWithKernel {
67
67
ctx->SetOutputDim (" Boxes" , framework::make_ddim (dim_vec));
68
68
ctx->SetOutputDim (" Variances" , framework::make_ddim (dim_vec));
69
69
}
70
+
71
+ protected:
72
+ framework::OpKernelType GetExpectedKernelType (
73
+ const framework::ExecutionContext& ctx) const override {
74
+ return framework::OpKernelType (
75
+ framework::ToDataType (ctx.Input <framework::Tensor>(" Input" )->type ()),
76
+ platform::CPUPlace ());
77
+ }
70
78
};
71
79
72
80
class PriorBoxOpMaker : public framework ::OpProtoAndCheckerMaker {
You can’t perform that action at this time.
0 commit comments