| 59 | return res; |
| 60 | } |
| 61 | static std::vector<std::string> _getAllInputs(const MNN::Net* net) { |
| 62 | auto tensorName = net->tensorName(); |
| 63 | auto oplist = net->oplists(); |
| 64 | std::vector<std::string> res; |
| 65 | if (nullptr == oplist || nullptr == tensorName) { |
| 66 | FUNC_PRINT(1); |
| 67 | return res; |
| 68 | } |
| 69 | for (int i=0; i<oplist->size(); ++i) { |
| 70 | auto op = oplist->GetAs<MNN::Op>(i); |
| 71 | if (op->type() == MNN::OpType_Input) { |
| 72 | auto index = op->outputIndexes()->data()[0]; |
| 73 | res.emplace_back(tensorName->GetAsString(index)->str()); |
| 74 | } |
| 75 | } |
| 76 | return res; |
| 77 | } |
| 78 | |
| 79 | template<typename T> |
| 80 | inline T stringConvert(const char* number) { |
no test coverage detected