Some question about onnxruntime
Closed this issue · 5 comments
Hello, I am a beginner of C++ onnx reasoning framework (just trying to learn C++ + onnx deployment scheme from python + torch/onnx), I am very happy to see the good examples provided by this repo, which provides me with great help, when I was constructing a tensor that generates multiple inputs, the following error occurred:
Error C2280 “Ort::Value &Ort::Value::operator =(const Ort::Value &)”: 尝试引用已删除的函数 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vector 1485
I Want to ask how to solve it? How to locate the problem of the bug?
@OroChippw Hi. Thank you 😊.
it's hard to understand where's the issue in your case (especially without error's description) but looks like you try to assign something incorrectly ("Ort::Value::operator =")
here's about multiple inputs for onnx
in this "project" I do vector of multiple inputs in this way:
std::vector<Ort::Value> ort_inputs;
ort_inputs.push_back(std::move(inputTensor));
ort_inputs.push_back(std::move(inputTensor2));
...
auto ort_outputs = session.Run(runOptions,
inputNames.data(),
ort_inputs.data(),
ort_inputs.size(),
outputNames.data(),
3);
@OroChippw Hi. Thank you 😊.
it's hard to understand where's the issue in your case (especially without error's description) but looks like you try to assign something incorrectly ("Ort::Value::operator =")
here's about multiple inputs for onnx
in this "project" I do vector of multiple inputs in this way:
std::vector<Ort::Value> ort_inputs; ort_inputs.push_back(std::move(inputTensor)); ort_inputs.push_back(std::move(inputTensor2)); ... auto ort_outputs = session.Run(runOptions, inputNames.data(), ort_inputs.data(), ort_inputs.size(), outputNames.data(), 3);
Thanks for your replying , I have solve this problem 😊
But when infer decoder onnx model, some times got error in session.Run, some times got 0x0 size mask output.
Like this :facebookresearch/segment-anything#294
Do you know how to solve it? thanks again looking forward to your reply😁
@OroChippw I have no idea why it happens ..
You can try to visualize low_res_maks property to check the results
@OroChippw thank you to help me find ncnn framework )
@OroChippw thank you to help me find ncnn framework )
HAHAHA ,it is my pleasure😁