From 7d66a8e3f603f2cd363f04a750847e3f9eabdfd4 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 17 Jul 2018 12:28:42 +0100 Subject: 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 Reviewed-by: Giorgio Arena Reviewed-by: Anthony Barbier --- examples/graph_mobilenet.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'examples/graph_mobilenet.cpp') 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 -- cgit v1.2.1