Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
Browse files Browse the repository at this point in the history
… ssd_api
  • Loading branch information
qingqing01 committed Mar 1, 2018
2 parents 38084df + 9e1ec8c commit 5033afd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions paddle/fluid/operators/bipartite_match_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ class BipartiteMatchOp : public framework::OperatorWithKernel {
ctx->SetOutputDim("ColToRowMatchIndices", dims);
ctx->SetOutputDim("ColToRowMatchDist", dims);
}

protected:
framework::OpKernelType GetExpectedKernelType(
const framework::ExecutionContext& ctx) const override {
return framework::OpKernelType(
framework::ToDataType(ctx.Input<LoDTensor>("DistMat")->type()),
platform::CPUPlace());
}
};

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/multiclass_nms_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MultiClassNMSOp : public framework::OperatorWithKernel {
return framework::OpKernelType(
framework::ToDataType(
ctx.Input<framework::LoDTensor>("Scores")->type()),
ctx.device_context());
platform::CPUPlace());
}
};

Expand Down
8 changes: 8 additions & 0 deletions paddle/fluid/operators/prior_box_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ class PriorBoxOp : public framework::OperatorWithKernel {
ctx->SetOutputDim("Boxes", framework::make_ddim(dim_vec));
ctx->SetOutputDim("Variances", framework::make_ddim(dim_vec));
}

protected:
framework::OpKernelType GetExpectedKernelType(
const framework::ExecutionContext& ctx) const override {
return framework::OpKernelType(
framework::ToDataType(ctx.Input<framework::Tensor>("Input")->type()),
platform::CPUPlace());
}
};

class PriorBoxOpMaker : public framework::OpProtoAndCheckerMaker {
Expand Down

0 comments on commit 5033afd

Please sign in to comment.