From 51c8f92337daa807082539410d424daf6486a0ba Mon Sep 17 00:00:00 2001 From: zp7 <9678873+ForceDaryl@users.noreply.github.com> Date: Tue, 25 Jun 2019 19:45:33 +0800 Subject: [PATCH] fix crash when input type is lod-tensor and input dims is 2 (#1703) --- src/operators/feed_op.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/operators/feed_op.cpp b/src/operators/feed_op.cpp index bff02499e6..d03f5c3ecb 100644 --- a/src/operators/feed_op.cpp +++ b/src/operators/feed_op.cpp @@ -23,11 +23,7 @@ void FeedOp::InferShape() const { out_dims[0] = this->param_.BatchSize(); int col = this->param_.Col(); auto input_dims = this->param_.InputX()->at(col).dims(); - if (input_dims.size() == 4) { - this->param_.Out()->Resize(input_dims); - } else { - this->param_.Out()->Resize(out_dims); - } + this->param_.Out()->Resize(input_dims); } } // namespace operators -- GitLab