From badf833e7eaff2ca47e2d9e4ca141a241eca780c Mon Sep 17 00:00:00 2001 From: liuqi Date: Tue, 21 Aug 2018 15:30:37 +0800 Subject: [PATCH] Fix bug: the output shape is not right in benchmark. --- docs/user_guide/op_lists.rst | 2 +- mace/core/net.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/user_guide/op_lists.rst b/docs/user_guide/op_lists.rst index 860c2f5f..e2521fc0 100644 --- a/docs/user_guide/op_lists.rst +++ b/docs/user_guide/op_lists.rst @@ -37,7 +37,7 @@ Operator lists "RELU1","Y","" "RELU6","Y","" "RELUX","Y","" - "RESHAPE","Y","Limited support: GPU is full supported, for CPU only supports softmax-like usage." + "RESHAPE","Y","Limited support: GPU only supports softmax-like usage, CPU only supports the usage which not change the storage format." "RESIZE_BILINEAR","Y","" "RNN","","" "RPN_PROPOSAL_LAYER","Y","" diff --git a/mace/core/net.cc b/mace/core/net.cc index 4922bc94..8a9c121a 100644 --- a/mace/core/net.cc +++ b/mace/core/net.cc @@ -114,9 +114,8 @@ MaceStatus SerialNet::Run(RunMetadata *run_metadata) { } std::vector> output_shapes; - for (auto output_shape : op->debug_def().output_shape()) { - output_shapes.push_back({output_shape.dims().begin(), - output_shape.dims().end()}); + for (auto output : op->Outputs()) { + output_shapes.push_back(output->shape()); } OperatorStats op_stats = {op->debug_def().name(), op->debug_def().type(), output_shapes, -- GitLab