diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-05-30 01:05:22 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-05-30 01:05:22 +0000 |
commit | 29dc1f2cba359e1af8ffef405b44416769550246 (patch) | |
tree | d019db552ce45278c3646938d87fe04ef26c9a52 | |
parent | 684fc6a00d18db72e75d831f5388290655e2557c (diff) | |
parent | c7e4e604b2d4f1cf8f2bdbe11350a48c719148d3 (diff) | |
download | ml-29dc1f2cba359e1af8ffef405b44416769550246.tar.gz |
Snap for 6542686 from c7e4e604b2d4f1cf8f2bdbe11350a48c719148d3 to rvc-release
Change-Id: Iaaab2d04a5c29c0ddb77949d1ca5e439f45f5329
-rw-r--r-- | nn/runtime/ExecutionBuilder.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nn/runtime/ExecutionBuilder.cpp b/nn/runtime/ExecutionBuilder.cpp index 61e320f9a..d65d96446 100644 --- a/nn/runtime/ExecutionBuilder.cpp +++ b/nn/runtime/ExecutionBuilder.cpp @@ -876,7 +876,11 @@ std::vector<OutputShape> ExecutionBuilder::getInitialOutputShapes() const { std::vector<OutputShape> outputShapes(mOutputs.size()); std::transform(mOutputs.begin(), mOutputs.end(), outputShapes.begin(), [](const auto& x) -> OutputShape { - return {.dimensions = x.dimensions(), .isSufficient = true}; + hidl_vec<uint32_t> dimensions; + if (x.state() != ModelArgumentInfo::HAS_NO_VALUE) { + dimensions = x.dimensions(); + } + return {.dimensions = std::move(dimensions), .isSufficient = true}; }); return outputShapes; } |