aboutsummaryrefslogtreecommitdiff
path: root/utils/GraphUtils.h
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-08-07 17:17:06 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitad486e21e5870f41774f30825c270762e08ae71e (patch)
tree71585d987c47dc6bdf7a5de23506b7b2e2352ca1 /utils/GraphUtils.h
parentc6aa49b6709edada24b1ab3bc1308e0974f9e057 (diff)
downloadComputeLibrary-ad486e21e5870f41774f30825c270762e08ae71e.tar.gz
COMPMID-1188 - Fixed files extensions in GraphUtils.h
Also fixed the calculation of num_elements in access_numpy_tensor Change-Id: Ic1a394ff829746d7803b81360830bade63b6b82a Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143132 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils/GraphUtils.h')
-rw-r--r--utils/GraphUtils.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/GraphUtils.h b/utils/GraphUtils.h
index 6cec2dae4d..52180ca495 100644
--- a/utils/GraphUtils.h
+++ b/utils/GraphUtils.h
@@ -25,6 +25,7 @@
#define __ARM_COMPUTE_GRAPH_UTILS_H__
#include "arm_compute/core/PixelValue.h"
+#include "arm_compute/core/Utils.h"
#include "arm_compute/core/utils/misc/Utility.h"
#include "arm_compute/graph/Graph.h"
#include "arm_compute/graph/ITensorAccessor.h"
@@ -403,14 +404,15 @@ inline std::unique_ptr<graph::ITensorAccessor> get_input_accessor(const arm_comp
}
else
{
- const std::string &image_file = graph_parameters.image;
- if(arm_compute::utility::endswith(image_file, ".npy"))
+ const std::string &image_file = graph_parameters.image;
+ const std::string &image_file_lower = lower_string(image_file);
+ if(arm_compute::utility::endswith(image_file_lower, ".npy"))
{
return arm_compute::support::cpp14::make_unique<NumPyBinLoader>(image_file);
}
- else if(arm_compute::utility::endswith(image_file, ".jpeg")
- || arm_compute::utility::endswith(image_file, ".jpg")
- || arm_compute::utility::endswith(image_file, ".ppm"))
+ else if(arm_compute::utility::endswith(image_file_lower, ".jpeg")
+ || arm_compute::utility::endswith(image_file_lower, ".jpg")
+ || arm_compute::utility::endswith(image_file_lower, ".ppm"))
{
return arm_compute::support::cpp14::make_unique<ImageAccessor>(image_file, bgr, std::move(preprocessor));
}