microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
base/string_tensor.h
15lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "ocos.h" |
| 7 | #include <string> |
| 8 | |
| 9 | |
| 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. |
| 12 | void GetTensorMutableDataString(const OrtApi& api, OrtW::CustomOpApi& ort, OrtKernelContext* context, |
| 13 | const OrtValue* value, std::vector<std::string>& output); |
| 14 | void FillTensorDataString(const OrtApi& api, OrtW::CustomOpApi& ort, OrtKernelContext* context, |
| 15 | const std::vector<std::string>& value, OrtValue* output); |
| 16 | |