From 2ef97e687c87f69908776f9496d38f3a44061dd8 Mon Sep 17 00:00:00 2001 From: hong19860320 <9973393+hong19860320@users.noreply.github.com> Date: Fri, 14 Feb 2020 13:50:21 +0800 Subject: [PATCH] [NPU] Fix the compiling error caused by operators::ValidateShape() (#2876) (#2882) --- lite/kernels/npu/bridges/reshape_op.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lite/kernels/npu/bridges/reshape_op.cc b/lite/kernels/npu/bridges/reshape_op.cc index 50c7f9d65a..00aa4b3497 100644 --- a/lite/kernels/npu/bridges/reshape_op.cc +++ b/lite/kernels/npu/bridges/reshape_op.cc @@ -73,8 +73,7 @@ int ReshapeConverter(void* ctx, OpLite* op, KernelBase* kernel) { auto shape = std::vector(actual_shape_data, actual_shape_data + actual_shape_dims.production()); - auto out_dims = lite::operators::ValidateShape(shape, x_dims); - auto out_shape = out_dims.Vectorize(); + auto out_shape = lite::operators::ValidateShape(shape, x_dims); if (out_shape.size() > 4) { LOG(WARNING) << "[NPU] HiAI DDK only supports less than 4 dimensions, " "but Shape has " @@ -88,8 +87,7 @@ int ReshapeConverter(void* ctx, OpLite* op, KernelBase* kernel) { reshape_op->set_input_w(*actual_shape_node->data()); } else { auto shape = op_info->GetAttr>("shape"); - auto out_dims = lite::operators::ValidateShape(shape, x_dims); - auto out_shape = out_dims.Vectorize(); + auto out_shape = lite::operators::ValidateShape(shape, x_dims); if (out_shape.size() > 4) { LOG(WARNING) << "[NPU] HiAI DDK only supports less than 4 dimensions, " "but shape has " -- GitLab