提交 b0063f2b 编写于 作者: 刘琦

Merge branch 'fix_mace_run' into 'master'

Fix MaceEngine::Run compatibality issue

See merge request !246
...@@ -556,6 +556,13 @@ MaceEngine::~MaceEngine() { ...@@ -556,6 +556,13 @@ MaceEngine::~MaceEngine() {
MACE_CHECK(hexagon_controller_->Finalize(), "hexagon finalize error"); MACE_CHECK(hexagon_controller_->Finalize(), "hexagon finalize error");
} }
}; };
bool MaceEngine::Run(const float *input,
const std::vector<index_t> &input_shape,
float *output) {
return Run(input, input_shape, output, nullptr);
}
bool MaceEngine::Run(const float *input, bool MaceEngine::Run(const float *input,
const std::vector<index_t> &input_shape, const std::vector<index_t> &input_shape,
float *output, float *output,
......
...@@ -360,10 +360,13 @@ class MaceEngine { ...@@ -360,10 +360,13 @@ class MaceEngine {
explicit MaceEngine(const NetDef *net_def, explicit MaceEngine(const NetDef *net_def,
DeviceType device_type); DeviceType device_type);
~MaceEngine(); ~MaceEngine();
bool Run(const float *input,
const std::vector<int64_t> &input_shape,
float *output);
bool Run(const float *input, bool Run(const float *input,
const std::vector<int64_t> &input_shape, const std::vector<int64_t> &input_shape,
float *output, float *output,
RunMetadata *run_metadata = nullptr); RunMetadata *run_metadata);
MaceEngine(const MaceEngine &) = delete; MaceEngine(const MaceEngine &) = delete;
MaceEngine &operator=(const MaceEngine &) = delete; MaceEngine &operator=(const MaceEngine &) = delete;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册