Browse Source

mark accuracy cannot find output node bug fix

tags/v0.7.0-beta
cjh9368 5 years ago
parent
commit
1e3f83ce50
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/lite/tools/benchmark/benchmark.cc

+ 4
- 0
mindspore/lite/tools/benchmark/benchmark.cc View File

@@ -230,6 +230,10 @@ int Benchmark::CompareOutput() {
for (const auto &calibTensor : calibData) {
std::string nodeName = calibTensor.first;
auto tensors = session->GetOutputsByName(nodeName);
if (tensors.empty()) {
MS_LOG(ERROR) << "Cannot find output node: " << nodeName.c_str() << " , compare output data fail.";
return RET_ERROR;
}
for (auto tensor : tensors) {
MS_ASSERT(tensor->GetDataType() == DataType_DT_FLOAT);
MS_ASSERT(tensor->GetData() != nullptr);


Loading…
Cancel
Save