From cd4e9abf7a165f15ccd10ac4541365d4f8a6db19 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Tue, 5 Nov 2019 17:50:27 +0000 Subject: COMPMID-2452: Add mnist example * Add small-mnist example * Add PrintAccessor * Add DequantizationLayer graph node Change-Id: I7bc8011e5a602f40fa3c47b231a2a69c804e78c2 Signed-off-by: Isabella Gottardi Reviewed-on: https://review.mlplatform.org/c/2274 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Reviewed-by: Georgios Pinitas --- utils/GraphUtils.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'utils/GraphUtils.cpp') diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp index e07e26f2fd..71bfc372fe 100644 --- a/utils/GraphUtils.cpp +++ b/utils/GraphUtils.cpp @@ -223,6 +223,19 @@ bool NumPyAccessor::access_tensor(ITensor &tensor) return false; } +#ifdef ARM_COMPUTE_ASSERTS_ENABLED +PrintAccessor::PrintAccessor(std::ostream &output_stream, IOFormatInfo io_fmt) + : _output_stream(output_stream), _io_fmt(io_fmt) +{ +} + +bool PrintAccessor::access_tensor(ITensor &tensor) +{ + tensor.print(_output_stream, _io_fmt); + return false; +} +#endif /* ARM_COMPUTE_ASSERTS_ENABLED */ + SaveNumPyAccessor::SaveNumPyAccessor(std::string npy_name, const bool is_fortran) : _npy_name(std::move(npy_name)), _is_fortran(is_fortran) { -- cgit v1.2.1