1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Bump supported ONNX RT version to 1.14.1

- Existing tests pass with the ONNX models mentioned in tests.
This commit is contained in:
Dmitry Matveev
2023-04-22 20:15:40 +00:00
parent 9ab0ff6cf2
commit 1d02146810
2 changed files with 10 additions and 12 deletions
@@ -44,7 +44,8 @@ static std::string pdims(const std::vector<int64_t> &dims) {
struct TensorInfo {
TensorInfo() = default;
explicit TensorInfo(const Ort::TensorTypeAndShapeInfo& info)
explicit TensorInfo(const Ort::ConstTensorTypeAndShapeInfo &info)
: dims(info.GetShape())
, type(info.GetElementType())
, is_dynamic(ade::util::find(dims, -1) != dims.end()) {
@@ -688,11 +689,10 @@ std::vector<TensorInfo> ONNXCompiled::getTensorInfo(TensorPosition pos) {
: this_session.GetOutputTypeInfo(i);
tensor_info.emplace_back(info.GetTensorTypeAndShapeInfo());
char *name_p = pos == INPUT
? this_session.GetInputName(i, allocator)
: this_session.GetOutputName(i, allocator);
tensor_info.back().name = name_p;
allocator.Free(name_p);
Ort::AllocatedStringPtr name_p = pos == INPUT
? this_session.GetInputNameAllocated(i, allocator)
: this_session.GetOutputNameAllocated(i, allocator);
tensor_info.back().name = std::string(name_p.get());
}
return tensor_info;