| 46 | } |
| 47 | |
| 48 | std::vector<string> GetOutput() { |
| 49 | std::vector<string> ans; |
| 50 | TfLiteTensor* tensor = interpreter_->tensor(output_); |
| 51 | |
| 52 | int num = GetStringCount(tensor); |
| 53 | for (int i = 0; i < num; i++) { |
| 54 | StringRef strref = GetString(tensor, i); |
| 55 | ans.push_back(string(strref.str, strref.len)); |
| 56 | } |
| 57 | return ans; |
| 58 | } |
| 59 | |
| 60 | private: |
| 61 | int input_; |
no test coverage detected