提交 65c54913 编写于 作者: M Megvii Engine Team

feat(load_and_run): feat --input parameter

GitOrigin-RevId: 2df8b6c164b3daffdbef20300664353832ab2ed8
上级 8419a4fb
...@@ -807,13 +807,16 @@ void run_test_st(Args &env) { ...@@ -807,13 +807,16 @@ void run_test_st(Args &env) {
parser.feed(path); parser.feed(path);
} }
auto inputs = parser.inputs; auto inputs = parser.inputs;
for (auto& i : inputs) { if (inputs.size() > 1) {
if (tensormap.find(i.first) == tensormap.end()) { for (auto& i : inputs) {
continue; mgb_assert(tensormap.find(i.first) != tensormap.end());
}
auto& in = tensormap.find(i.first)->second; auto& in = tensormap.find(i.first)->second;
in->copy_from(i.second); in->copy_from(i.second);
}
} else {
auto& in = tensormap.begin()->second;
in->copy_from(inputs.begin()->second);
} }
warmup(); warmup();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册