aboutsummaryrefslogtreecommitdiff
path: root/examples/graph_mobilenet.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-07-17 12:28:42 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit7d66a8e3f603f2cd363f04a750847e3f9eabdfd4 (patch)
tree0d7e1ad5bf0ecd32cd919074f756d27c351d7638 /examples/graph_mobilenet.cpp
parentae54e026c86aec7d6819ee3ef76372c1a3c92467 (diff)
downloadComputeLibrary-7d66a8e3f603f2cd363f04a750847e3f9eabdfd4.tar.gz
COMPMID-1386: Add support for converting weights for CL.
Change-Id: I62e3ead903366baeeb1488f233a9b8b0c388c9de Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/140403 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'examples/graph_mobilenet.cpp')
-rw-r--r--examples/graph_mobilenet.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp
index b30f4c5fd3..a747b3cd11 100644
--- a/examples/graph_mobilenet.cpp
+++ b/examples/graph_mobilenet.cpp
@@ -78,12 +78,10 @@ public:
// Create input descriptor
unsigned int spatial_size = (model_id == 0 || common_params.data_type == DataType::QASYMM8) ? 224 : 160;
- TensorShape tensor_shape = TensorShape(spatial_size, spatial_size, 3U, 1U);
- if(common_params.data_layout == DataLayout::NHWC)
- {
- arm_compute::permute(tensor_shape, arm_compute::PermutationVector(2U, 0U, 1U));
- }
- TensorDescriptor input_descriptor = TensorDescriptor(tensor_shape, common_params.data_type).set_layout(common_params.data_layout);
+
+ // Create input descriptor
+ const TensorShape tensor_shape = permute_shape(TensorShape(spatial_size, spatial_size, 3U, 1U), DataLayout::NCHW, common_params.data_layout);
+ TensorDescriptor input_descriptor = TensorDescriptor(tensor_shape, common_params.data_type).set_layout(common_params.data_layout);
// Set graph hints
graph << common_params.target