diff --git a/docs/execution-providers/OpenVINO-ExecutionProvider.md b/docs/execution-providers/OpenVINO-ExecutionProvider.md index fea699fa0f..0afb519c49 100644 --- a/docs/execution-providers/OpenVINO-ExecutionProvider.md +++ b/docs/execution-providers/OpenVINO-ExecutionProvider.md @@ -170,7 +170,7 @@ Use the ONNX API's.[documentation](https://github.com/onnx/onnx/blob/master/docs Example: -```bash +```python import onnx onnx_model = onnx.load("model.onnx") # Your model in memory as ModelProto onnx.save_model(onnx_model, 'saved_model.onnx', save_as_external_data=True, all_tensors_to_one_file=True, location='data/weights_data', size_threshold=1024, convert_attribute=False) diff --git a/docs/performance/graph-optimizations.md b/docs/performance/graph-optimizations.md index 818022ebf3..9c6367b7f9 100644 --- a/docs/performance/graph-optimizations.md +++ b/docs/performance/graph-optimizations.md @@ -135,11 +135,11 @@ session = rt.InferenceSession("", sess_options) g_ort->SetSessionGraphOptimizationLevel(session_options, ORT_ENABLE_EXTENDED); // To enable model serialization after graph optimization set this - const wchar_t* optimized_model_path = L"optimized_model_path"; + const ORTCHAR_T* optimized_model_path = ORT_TSTR("optimized_model_path"); g_ort->SetOptimizedModelFilePath(session_options, optimized_model_path); OrtSession* session; - const wchar_t* model_path = L"model_path"; + const ORTCHAR_T* model_path = ORT_TSTR("model_path"); g_ort->CreateSession(env, model_path, session_option, &session); ``` diff --git a/docs/performance/tune-performance.md b/docs/performance/tune-performance.md index 2ab5f03818..d894f7797e 100644 --- a/docs/performance/tune-performance.md +++ b/docs/performance/tune-performance.md @@ -531,7 +531,7 @@ api.SessionOptionsAppendExecutionProvider_CUDA_V2(static_cast input{}; diff --git a/docs/tutorials/mnist_cpp.md b/docs/tutorials/mnist_cpp.md index 81edf8159e..5bb9e4832d 100644 --- a/docs/tutorials/mnist_cpp.md +++ b/docs/tutorials/mnist_cpp.md @@ -128,13 +128,13 @@ To make things more interesting, the window painting handler graphs the probabil ### The Ort::Session 1. Creation: The Ort::Session is created inside the MNIST structure here: - ``` - Ort::Session session_{env, L"model.onnx", Ort::SessionOptions{nullptr}}; + ```c++ + Ort::Session session_{env, ORT_TSTR("model.onnx"), Ort::SessionOptions{nullptr}}; ``` [[Source]](https://github.com/microsoft/onnxruntime/blob/521dc757984fbf9770d0051997178fbb9565cd52/samples/c_cxx/MNIST/MNIST.cpp#L43) 2. Setup inputs & outputs: The input & output tensors are created here: - ``` + ```c++ MNIST() { auto allocator_info = Ort::AllocatorInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeCPU); input_tensor_ = Ort::Value::CreateTensor(allocator_info, input_image_.data(), input_image_.size(), input_shape_.data(), input_shape_.size()); @@ -146,7 +146,7 @@ To make things more interesting, the window painting handler graphs the probabil In this usage, we're providing the memory location for the data instead of having Ort allocate the buffers. This is simpler in this case since the buffers are small and can just be fixed members of the MNIST struct. 3. Run: Running the session is done in the Run() method: - ``` + ```c++ int Run() { const char* input_names[] = {"Input3"}; const char* output_names[] = {"Plus214_Output_0"};