From e77e265f15069476f4129a352be6edc93fbab68d Mon Sep 17 00:00:00 2001 From: wangliu Date: Wed, 30 May 2018 14:29:07 +0800 Subject: [PATCH] Init tensor memory in executor_for_test --- src/framework/operator.cpp | 1 + test/executor_for_test.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/framework/operator.cpp b/src/framework/operator.cpp index dfdf0af79a..808002d4c8 100644 --- a/src/framework/operator.cpp +++ b/src/framework/operator.cpp @@ -23,6 +23,7 @@ vector OperatorBase::GetOutKeys() const { auto it = op_input_output_key.find(type_); if (it == op_input_output_key.end()) { DLOG << type_ << " has no outputs"; + return {}; } return it->second.second; } diff --git a/test/executor_for_test.h b/test/executor_for_test.h index c69eba222f..48b6b5cf3c 100644 --- a/test/executor_for_test.h +++ b/test/executor_for_test.h @@ -73,6 +73,7 @@ class Executor4Test : public Executor { } } } + this->InitMemory(); } template -- GitLab