From 4ab641e232c4eebfb4937963bb0c6f878bfe6d87 Mon Sep 17 00:00:00 2001 From: "Zhang, Guoming" Date: Wed, 10 Oct 2018 18:22:07 +0800 Subject: [PATCH] Revert "Add missing reshape found by GM" This reverts commit b59c1063f522d23e9d19e64103dd170c6c31d823. --- paddle/fluid/operators/dequantize_op.cc | 7 ------- paddle/fluid/operators/quantize_op.cc | 8 -------- paddle/fluid/operators/requantize_op.cc | 8 -------- 3 files changed, 23 deletions(-) diff --git a/paddle/fluid/operators/dequantize_op.cc b/paddle/fluid/operators/dequantize_op.cc index f8d87af8ae8..1ee5ed61ec0 100644 --- a/paddle/fluid/operators/dequantize_op.cc +++ b/paddle/fluid/operators/dequantize_op.cc @@ -35,13 +35,6 @@ using platform::GetMKLDNNFormat; template class DeQuantOpKernel : public framework::OpKernel { public: - void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE(ctx->HasInput("Input"), "Input should not be null"); - PADDLE_ENFORCE(ctx->HasOutput("Output"), "Output should not be null"); - - ctx->SetOutputDim("Output", ctx->GetInputDim("Input")); - ctx->ShareLoD("Input", /*->*/ "Output"); - } void Compute(const framework::ExecutionContext& ctx) const override { auto* input = ctx.Input("Input"); diff --git a/paddle/fluid/operators/quantize_op.cc b/paddle/fluid/operators/quantize_op.cc index d7c831ab5ad..06336b025e4 100644 --- a/paddle/fluid/operators/quantize_op.cc +++ b/paddle/fluid/operators/quantize_op.cc @@ -33,14 +33,6 @@ using platform::GetMKLDNNFormat; template class QuantOpKernel : public framework::OpKernel { public: - void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE(ctx->HasInput("Input"), "Input should not be null"); - PADDLE_ENFORCE(ctx->HasOutput("Output"), "Output should not be null"); - - ctx->SetOutputDim("Output", ctx->GetInputDim("Input")); - ctx->ShareLoD("Input", /*->*/ "Output"); - } - void Compute(const framework::ExecutionContext& ctx) const override { auto* input = ctx.Input("Input"); auto* scale = ctx.Input("Scale"); diff --git a/paddle/fluid/operators/requantize_op.cc b/paddle/fluid/operators/requantize_op.cc index 3b308400d91..9abc0a4ea45 100644 --- a/paddle/fluid/operators/requantize_op.cc +++ b/paddle/fluid/operators/requantize_op.cc @@ -34,14 +34,6 @@ using platform::GetMKLDNNFormat; template class ReQuantOpKernel : public framework::OpKernel { public: - void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE(ctx->HasInput("Input"), "Input should not be null"); - PADDLE_ENFORCE(ctx->HasOutput("Output"), "Output should not be null"); - - ctx->SetOutputDim("Output", ctx->GetInputDim("Input")); - ctx->ShareLoD("Input", /*->*/ "Output"); - } - void Compute(const framework::ExecutionContext& ctx) const override { auto* input = ctx.Input("Input"); auto* scale = ctx.Input("Scale"); -- GitLab