Skip to content

Commit

Permalink
fixed type to experimental session constructor (microsoft#6950)
Browse files Browse the repository at this point in the history
* fixed type to experimental session constructor

Co-authored-by: David Medine <david.medine@brainproducts.com>
dmedine and David Medine authored Mar 10, 2021
1 parent 4884eee commit f723ff2
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions samples/c_cxx/model-explorer/batch-model-explorer.cpp
Original file line number Diff line number Diff line change
@@ -60,7 +60,14 @@ int main(int argc, char** argv) {
cout << "Usage: ./onnx-api-example <onnx_model.onnx>" << endl;
return -1;
}

#ifdef _WIN32
std::string str = argv[1];
std::wstring wide_string = std::wstring(str.begin(), str.end());
std::basic_string<ORTCHAR_T> model_file = std::basic_string<ORTCHAR_T>(wide_string);
#else
std::string model_file = argv[1];
#endif

// onnxruntime setup
Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "batch-model-explorer");
7 changes: 7 additions & 0 deletions samples/c_cxx/model-explorer/model-explorer.cpp
Original file line number Diff line number Diff line change
@@ -49,7 +49,14 @@ int main(int argc, char** argv) {
cout << "Usage: ./onnx-api-example <onnx_model.onnx>" << endl;
return -1;
}

#ifdef _WIN32
std::string str = argv[1];
std::wstring wide_string = std::wstring(str.begin(), str.end());
std::basic_string<ORTCHAR_T> model_file = std::basic_string<ORTCHAR_T>(wide_string);
#else
std::string model_file = argv[1];
#endif

// onnxruntime setup
Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "example-model-explorer");

0 comments on commit f723ff2

Please sign in to comment.