[neurun] Fix nnfw_output_tensorinfo (#7035)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Thu, 29 Aug 2019 09:48:23 +0000 (18:48 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 29 Aug 2019 09:48:23 +0000 (18:48 +0900)
nnfw_session::output_tensoninfo should uses output size, instead of input size.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
runtimes/neurun/frontend/api/wrapper/nnfw_api.cc

index d6beeb7..49474fd 100644 (file)
@@ -233,7 +233,7 @@ NNFW_STATUS nnfw_session::output_tensorinfo(uint32_t index, nnfw_tensorinfo *ti)
                 << std::endl;
       return NNFW_STATUS_ERROR;
     }
-    if (index >= _graph->getInputs().size())
+    if (index >= _graph->getOutputs().size())
     {
       std::cerr << "Error during nnfw_session::output_tensorinfo, index is out of range."
                 << std::endl;