microsoft/onnxruntime-extensions
Publicmirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable
base/string_tensor.h
15lines · modeblame
d48d825aXavier Dupré5 years ago | 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. | |
| 3 | | |
| 4 | #pragma once | |
| 5 | | |
c891e5d7Wenbing Li5 years ago | 6 | #include "ocos.h" |
ee306deeWenbing Li3 years ago | 7 | #include <string> |
d48d825aXavier Dupré5 years ago | 8 | |
37598fefMojimi5 years ago | 9 | |
d48d825aXavier Dupré5 years ago | 10 | // Retrieves a vector of strings if the input type is std::string. |
| 11 | // It is a copy of the input data and can be modified to compute the output. | |
c599b00dWenbing Li3 years ago | 12 | void GetTensorMutableDataString(const OrtApi& api, OrtW::CustomOpApi& ort, OrtKernelContext* context, |
d48d825aXavier Dupré5 years ago | 13 | const OrtValue* value, std::vector<std::string>& output); |
c599b00dWenbing Li3 years ago | 14 | void FillTensorDataString(const OrtApi& api, OrtW::CustomOpApi& ort, OrtKernelContext* context, |
d48d825aXavier Dupré5 years ago | 15 | const std::vector<std::string>& value, OrtValue* output); |